Skip to content
TurtleKitty edited this page May 18, 2019 · 1 revision

sort

Generic sort procedure. It is defined for lists and vectors.

(def xs '(8 6 7 5 3 0 9))
(def v  #(vector x y z z y))

(sort < xs) ; (0 3 5 6 7 8 9)
(sort > xs) ; (9 8 7 6 5 3 0)
(sort > v)  ; #(vector x y y z z)
(sort < v)  ; #(vector z z y y x)
Clone this wiki locally