SORT-LIST

[GENERIC-FUNCTION]


OM 6.1
Function Reference
ARGUMENTS:
  - lst a list  
&optional
 
  - test test function [default = <]
  - key test key  
  - rec recursive sort  

Description:

Sorts a list.
<test> is a binary function or function name indicating how to compare elements.
<key> is a function or function name that will be applied to elements before the test.

If <rec> is T, then the sort will be applied recursively to the sub-lists in <lst>.

Ex. (sort-list '(3 6 7 2 1)) => (1 2 3 6 7)
Ex. (sort-list '(3 6 7 2 1) '>) => (7 6 3 2 1)
Ex. (sort-list '((a 3) (b 6) (c 7) (d 2) (e 1)) '> 'second) => ((c 7) (b 6) (a 3) (d 2) (e 1))