mirror of
https://github.com/apple/swift-algorithms
synced 2026-11-25 04:27:47 +00:00
32 lines
894 B
Markdown
32 lines
894 B
Markdown
# Slicing and Splitting
|
|
|
|
Iterate over tuple pairs of adjacent elements, overlapping windows of a specified size, or lazily-calculated splits.
|
|
|
|
## Topics
|
|
|
|
### Adjacent Pairs
|
|
|
|
- ``Swift/Sequence/adjacentPairs()``
|
|
- ``Swift/Collection/adjacentPairs()``
|
|
|
|
### Windows
|
|
|
|
- ``Swift/Collection/windows(ofCount:)``
|
|
|
|
### Lazily Splitting a Collection
|
|
|
|
These methods…
|
|
|
|
- ``Swift/LazySequenceProtocol/split(separator:maxSplits:omittingEmptySubsequences:)-4q4x8``
|
|
- ``Swift/LazySequenceProtocol/split(maxSplits:omittingEmptySubsequences:whereSeparator:)-68oqf``
|
|
- ``Swift/LazySequenceProtocol/split(separator:maxSplits:omittingEmptySubsequences:)-a46s``
|
|
- ``Swift/LazySequenceProtocol/split(maxSplits:omittingEmptySubsequences:whereSeparator:)-3rwee``
|
|
|
|
### Supporting Types
|
|
|
|
- ``AdjacentPairsSequence``
|
|
- ``AdjacentPairsCollection``
|
|
- ``WindowsOfCountCollection``
|
|
- ``SplitSequence``
|
|
- ``SplitCollection``
|