Sorting with multiple SortComparator uses a Sequence instead of Collection
Opened this issue · 0 comments
james-kwong commented
I see there is a function to sort a Sequence
of elements using any Sequence
of SortComparator
here:
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.