You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, shouldn't the sequence of sort comparators being passed to sorted be of type Collection instead? Because a Sequence doesn't mandate the ability to iterate non-destructively, but the sorted function iterates through the provided Sequence multiple times.
The text was updated successfully, but these errors were encountered:
I see there is a function to sort a
Sequence
of elements using anySequence
ofSortComparator
here:https://github.com/apple/swift-foundation/blob/main/Sources/FoundationEssentials/SortComparator.swift#L234
However, shouldn't the sequence of sort comparators being passed to
sorted
be of typeCollection
instead? Because aSequence
doesn't mandate the ability to iterate non-destructively, but thesorted
function iterates through the providedSequence
multiple times.The text was updated successfully, but these errors were encountered: