UnfoldSequence

    A sequence whose elements are produced via repeated applications of a closure to some mutable state.

    @frozen struct UnfoldSequence<Element, State>

    The elements of the sequence are computed lazily and the sequence may potentially be infinite in length.

    Instances of UnfoldSequence are created with the functions sequence(first:next:) and sequence(state:next:).

    Citizens in Swift

    Conformances

    Instance members

    Instance features

    Show obsolete interfaces (1)

    Hide obsolete interfaces

    Citizens in Swift

    where Element:Copyable, Element:Sendable, Element:Escapable, State:Copyable, State:Sendable, State:Escapable

    Conformances