Iterator

public struct Iterator : IteratorProtocol

A type that provides the sequence’s iteration interface and encapsulates its iteration state.

  • The type of element traversed by the iterator.

    Declaration

    Swift

    public typealias Either<A, B>.Iterator.Element = A.Element
  • Advances to the next element and returns it, or nil if no next element exists.

    Declaration

    Swift

    public mutating func next() -> Element?