Next: dynamic arrays iterthunks, Previous: dynamic arrays misc, Up: dynamic arrays [Index]
The following syntactic bindings are exported by the library
(vicare containers dynamic-arrays sort)
. The syntactic bindings
whose name is prefixed with $
are unsafe operations: they do
not validate their arguments before accessing them.
Build and return a new dynamic array holding all the objects from arry sorted from the lesser to the greater according to the comparison procedure item<.
item< must be a procedure accepting two objects from arry and returning true if the first argument is less than the second argument.
(let* ((C1 (dynamic-array 0 4 3 1 2 5)) (C2 (dynamic-array-sort < C1))) (dynamic-array->list C2)) ⇒ (0 1 2 3 4 5)
Sort all the objects from arry from the lesser to the greater according to the comparison procedure item<; arry itself is mutated and returned.
item< must be a procedure accepting two objects from arry and returning true if the first argument is less than the second argument.
(let ((C (dynamic-array 0 4 3 1 2 5))) (dynamic-array->list (dynamic-array-sort! < C))) ⇒ (0 1 2 3 4 5)