vl-sort


(vl-sort lst comparator)

This function returns a list of sorted elements from lst using the specified comparator function.

Arguments

lst  (list) any list of items
comparator  (symbol, function, lambda) function used for the boolean comparison; must return NIL resp. non-NIL

Return

(list) list of sorted elements

Example

(vl-sort '(3 5 1 1 7 0) '>)
returns (7 5 3 1 0)

Remarks

duplicate elements are automatically removed from the sorted list  !



©  Bricsys NV. All rights reserved.