[Openmcl-devel] sort lists

Janusz Podrazik info at mracpublishing.com
Sat May 14 02:14:19 PDT 2011


I try to sort lists but can't find any help to do deeper sort.

example:

(setq list '((0) (1) (2) (0 1 5) (0 1 3) (0 1 5) (0 3 0) (0) (1) (2 7 19) (0 0 3 0)))

(stable-sort list #'< :key #'car)
--> ((0) (0 1 5) (0 1 3) (0 1 5) (0 3 0) (0) (0 0 3 0) (1) (1) (2) (2 7 19))

but I am looking for:
--> ((0) (0) (0 0 3 0) (0 1 3) (0 1 5) (0 1 5) (0 3 0) (1) (1) (2) (2 7 19))

--
Janusz Podrazik
MRAC Publishing


More information about the Openmcl-devel mailing list