keyOf<T, R extends Comparable<R> > function
Creates a comparator that compares values of type T but delegates the
decision to a Comparable<R> with the provided transformation.
Implementation
Comparator<T> keyOf<T, R extends Comparable<R>>(
R Function(T value) transformation,
) => naturalComparable<R>.keyOf(transformation);