Type Alias

Range.SubSequence

A sequence that represents a contiguous subrange of the collection’s elements.

Declaration

typealias SubSequence = Range<Bound>
Available when Bound conforms to Strideable and Bound.Stride conforms to SignedInteger.

Discussion

This associated type appears as a requirement in the Sequence protocol, but it is restated here with stricter constraints. In a collection, the subsequence should also conform to Collection.

See Also

Supporting Types

typealias Range.Element

A type representing the sequence’s elements.

typealias Range.Index

A type that represents a position in the range.

typealias Range.Indices

A type that represents the indices that are valid for subscripting the collection, in ascending order.

typealias Range.Iterator

A type that provides the sequence’s iteration interface and encapsulates its iteration state.