EnumeratedSequence.Iterator
The iterator for EnumeratedSequence.
Declaration
@frozen struct IteratorOverview
An instance of this iterator wraps a base iterator and yields successive Int values, starting at zero, along with the elements of the underlying base iterator. The following example enumerates the elements of an array:
var iterator = ["foo", "bar"].enumerated().makeIterator()
iterator.next() // (0, "foo")
iterator.next() // (1, "bar")
iterator.next() // nilTo create an instance, call enumerated().makeIterator() on a sequence or collection.