Instance Subscriptswift 6.0.1Swift

    subscript(_:)

    Accesses the element at the specified position.

    subscript(position: Int) -> Element { get set }

    Parameters

    position

    The position of the element to access. The only valid position in a CollectionOfOne instance is 0.

    Other members in extension

    Types

    • struct Iterator

      An iterator that produces one or zero instances of an element.

    Typealiases

    Type members

    • init(Element)

      Creates an instance containing just the given element.

    Instance members