---
title: SubSequence
framework: swift
role: symbol
role_heading: Associated Type
path: swift/collection/subsequence
---

# SubSequence

A collection representing a contiguous subrange of this collection’s elements. The subsequence shares indices with the original collection.

## Declaration

```swift
associatedtype SubSequence : Collection = Slice<Self> where Self.Element == Self.SubSequence.Element, Self.SubSequence == Self.SubSequence.SubSequence
```

## Discussion

Discussion The default subsequence type for collections that don’t define their own is Slice.
