sort items in collection using given action, in ascending order
Parameters
arrange collection :integer :string :literal :dictionary :object :inline :block :range
params :null :literal :block
condition :block :bytecode
Attributes
with | :literal | use given index |
descending | | sort in descending order |
Returns
Examples
copy
arrange ["the" "brown" "fox" "jumped" "over" "the" "lazy" "dog"] => size
; => ["the" "fox" "the" "dog" "over" "lazy" "brown" "jumped"]
copy
arrange.descending 1..10 'x -> size factors.prime x
; => [8 4 6 9 10 2 3 5 7 1]
Related