- :block
- or :nothing
sort
sort given block in ascending order
Parameters
sort collection :literal :dictionary :block
Attributes
as | :literal | localized by ISO 639-1 language code |
sensitive | case-sensitive sorting | |
descending | sort in descending order | |
ascii | sort by ASCII transliterations | |
values | sort dictionary by values | |
by | :string, :literal | sort array of dictionaries by given key |
Returns
Examples
copya: [3 1 6] print sort a ; 1 3 6
copyprint sort.descending a ; 6 3 1
copyb: ["one" "two" "three"] sort 'b print b ; one three two