Subscript

subscript(_:)

Accesses the element at the specified position.

Declaration

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

Parameters

position

The position of the element to access. position must be a valid index of the collection that is not equal to the endIndex property.