function
boot.janet on line 959 , column 1
(sort ind &opt before? )
Sorts `ind` in-place , and returns it. Uses quick-sort and is not a
stable sort. If a `before?` comparator function is provided , sorts
elements using that , otherwise uses `<` .
(def a @[[42 "c" ] [68 "b" ] [31 "d" ] [27 "a" ]])
(sort a (fn [a b ]
( (a 1 ) (b 1 ))))
(pp a ) # @[(27 "a") (68 "b") (42 "c") (31 "d")]
(sort @[5 4 1 3 2 ]) # -> @[1 2 3 4 5]
(sort @[5 4 1 3 2 ] ) # -> @[5 4 3 2 1]