sortedBy
fun <T, R : Comparable<R>> Sequence<T>.sortedBy(ordering: Ordering, comparator: <Error class: unknown class><in R>? = null, selector: (T) -> R?): Sequence<T>
Sorts elements by a selector value in the given ordering.
null values are always sorted first, regardless of the ordering.
Return
a new sequence with elements sorted according to the selector and ordering
Parameters
ordering
selector
function that extracts a comparable value from each element