sortedByDescending<R extends Comparable> method

KtList<T> sortedByDescending<R extends Comparable>(
  1. R selector(
    1. T
    )
)

Returns a list of all elements sorted descending according to natural sort order of the value returned by specified selector function.

Implementation

KtList<T> sortedByDescending<R extends Comparable>(R Function(T) selector) {
  return sortedWith(compareByDescending(selector));
}