sorted

.sorted from:{Iterable<Any>} by:{Lambda? = null} -> Iterable<Any>

Return

a new collection with the same elements as the original, sorted

Parameters

from

collection to sort

by

optional sorting function. If not provided, the collection is sorted by its natural order.

Throws

if the elements, or the properties supplied by by, cannot be compared