sortedBy<R extends Comparable> method
Returns a list of all elements sorted according to natural sort order of the value returned by specified selector
function.
Implementation
@useResult
KtList<T> sortedBy<R extends Comparable>(R Function(T) selector) {
return sortedWith(compareBy(selector));
}