Stably sort the sequence value of place, and change the value of place to the sorted result.
Arguments and values
|place||A form which is suitable for use as a generalized reference|
|predicate||A function designator specifying a function object of two arguments that returns a generalized boolean|
|key|| A function designator specifying a function object
of one argument, or |
The first argument to the predicate function is one element of the sequence value in place (or part of that element extracted by the key function, if supplied); the second argument another element of the sequence (or part of that element extracted by the key function, if supplied). The predicate function should return true if and only if the first argument is strictly less than the second; otherwise the predicate should return false.
The sorting operation can be destructive. Elements considered equal by predicate stay in their original order.
> (defparameter *x* '(1 2 3 6 5 4)) *x* > (stable-sortf *x* #'(lambda (x y) (and (oddp x) (evenp y)))) (1 3 5 2 6 4) > *x* (1 3 5 2 6 4) >
The GBBopen Project