A sequence that represents a contiguous subrange of the collection’s elements.
Required.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
associatedtype SubSequence : Collection = Slice<Self> where Self.Element == Self.SubSequence.Element, Self.SubSequence == Self.SubSequence.SubSequence
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.