IteratorCursor

public final class IteratorCursor<Base : IteratorProtocol> : Cursor

A Cursor whose elements are those of a sequence iterator.

  • Creates a cursor from a sequence iterator.

    Declaration

    Swift

    public init(_ base: Base)
  • Creates a cursor from a sequence.

    Declaration

    Swift

    public init<S : Sequence>(_ s: S) where S.Iterator == Base
  • Advances to the next element and returns it, or nil if no next element exists.

    Declaration

    Swift

    public func next() -> Base.Element?