AnySequence

    A type-erased sequence.

    @frozen struct AnySequence<Element>

    An instance of AnySequence forwards its operations to an underlying base sequence having the same Element type, hiding the specifics of the underlying sequence.

    Citizens in Swift

    Typealiases

    Type members

    • init<S>(S)

      Creates a new sequence that wraps and forwards operations to base.

    • init<I>(@escaping () -> I)

      Creates a sequence whose makeIterator() method forwards to makeUnderlyingIterator.

    Instance members

    Citizens in Swift

    where Element:Copyable, Element:Escapable

    Conformances

    Instance features

    Show obsolete interfaces (1)

    Hide obsolete interfaces