EitherCollection

extension EitherCollection: Collection
  • A type that represents a position in the collection.

    Declaration

    Swift

    public typealias Index = Either<A.Index, B.Index>
  • The position of the first element in a nonempty collection.

    Declaration

    Swift

    public var startIndex: Index { get }
  • The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.

    Declaration

    Swift

    public var endIndex: Index { get }
  • Returns the position immediately after the given index.

    Declaration

    Swift

    public func index(after i: Index) -> Index
  • Accesses the element at the specified position.

    Declaration

    Swift

    public subscript(position: Index) -> Element { get }