sortedWithDescending

fun <T> Iterable<T>.sortedWithDescending(vararg selectors: (T) -> Comparable<*>): List<T>

Returns a list of all elements sorted according to the specified selectors.

The sort is stable. It means that equal elements preserve their order relative to each other after sorting.

Sources

Link copied to clipboard