Instance Methodswift 6.0.3Swift
next
Advances to the next element and returns it, or nil
if no next element exists.
mutating func next() -> Base.Element?
Once nil
has been returned, all subsequent calls return nil
.
Advances to the next element and returns it, or nil
if no next element exists.
mutating func next() -> Base.Element?
where Base:IteratorProtocol
Once nil
has been returned, all subsequent calls return nil
.
import Swift
@frozen struct IteratorSequence<Base> where Base : IteratorProtocol
A sequence built around an iterator of type Base
.
associatedtype Element
The type of element traversed by the iterator.
protocol IteratorProtocol<Element>
A type that supplies the values of a sequence one at a time.
typealias Element = Base.Element