Global Functionfwcd.swift-utils 4.6.2Utils
ascendingComparator(comparing:)
A higher-order function that produces an ascending comparator (as used by sorted(by:)) comparing a specific property.
func ascendingComparator<T, P>(comparing property: @escaping (T) -> P) -> (T, T) -> Bool where P : Comparable