* Add uniquePermutations as wrapper for nextPermutation
* Implement uniquePermutations(ofCount:) variants
* Simplify UniquePermutations.Iterator.next()
* Add tests for uniquePermutations
* Move to a predicate-based uniquePermutations
* Add method documentation
* Convert to Hashable-based uniquing instead of Comparable
* Streamline tests, cover uniqueness
* Use optional count to collapse no-count method
* Update API documentation
* Remove leftover version of nextPermutation()
* Remove Hashable requirement from the UniquePermutations type
* Update documentation
* Apply Tim's great revisions
Co-authored-by: Tim Vermeulen <tvermeulen@apple.com>
* Add lazy conformance to UniquePermutations
Co-authored-by: Tim Vermeulen <tvermeulen@apple.com>
`split(maxSplits:omittingEmptySubsequences:whereSeparator:)`
and
`split(separator:maxSplits:omittingEmptySubsequences:)`
now operate lazily when called on `LazySequenceProtocol`- or
`LazyCollectionProtocol`-conforming values. In the latter case,
no additional storage is allocated on the heap.
This renames sortedPrefix to min(count:), adds max(count:),
and moves both methods down to Sequence.
In order to still provide the optimization when `count` is close to
a collection's length, we include a Collection-specific overload of
all methods. These won't be accessed when in a Sequence-generic context,
but it's the best we can do without adding these methods as protocol
requirements.
* Rename `chained(with:)` to `chain(_:_:)`
This follows a forum discussion about the `chained(with:)` name.
The old names are preserved as deprecated symbols.
* Remove conditional lazy conformance from `Chain2`