sortedWith

fun <T> Iterable<T>.sortedWith(vararg selectors: (T) -> Comparable<*>): List<T>(source)
fun <T> Sequence<T>.sortedWith(vararg selectors: (T) -> Comparable<*>): Sequence<T>(source)

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.

Since

0.12.0