What we need here is sort_by from Ruby. How about adding these overloads?
func sort<U: Comparable>(by: (T) -> U) func sorted<U: Comparable>(by: (T) -> U) -> [T]
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
