there is a ```public fun <T> compareBy(varar...
# stdlib
e
there is a
Copy code
public fun <T> compareBy(vararg selectors: (T) -> Comparable<*>?): Comparator<T>
but the descending counterpart is missing
m
There is
Copy code
public inline fun <T> compareByDescending(crossinline selector: (T) -> Comparable<*>?): Comparator<T>
e
I need
vararg
m
Oh, I missed that. You can use
compareBy { … }.reversed()
in the meantime.
e
nice, thanks