# sorted

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

Content copied to clipboard

#### Return

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

#### Parameters

from

collection to sort

by

- Optional

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

#### Throws

IllegalArgumentException

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

#### Chaining

This function is designed to be chained with other function calls:

    Iterable<Any>::sorted by:{Lambda?} -> Iterable<Any>

Content copied to clipboard