| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
sort! destructively reuses the cons cells of the original
list. The sorting order is specified by cmpfn, which is
a procedure takes two elements of list, and returns #t
if the first argument strictly precedes the second.
(sort '(("Chopin" "Frederic")
("Liszt" "Franz")
("Alkan" "Charles-Valentin"))
(lambda (x y) (string<? (car x) (car y))))
=> (("Alkan" "Charles-Valentin")
("Chopin" "Frederic")
("Liszt" "Franz"))
|
Some builtin objects have natural comparison order, and it is used
if cmpfn is omitted.