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