mirror of
https://github.com/apple/swift-algorithms
synced 2026-11-22 04:10:39 +00:00
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.