sort(using:)
Sorts the collection using the given comparator to compare elements.
Declaration
mutating func sort<Comparator>(using comparator: Comparator) where Comparator : SortComparator, Self.Element == Comparator.ComparedParameters
- comparator:
The sort comparator used to compare elements.