17.4. Functions `SORT` & `STABLE-SORT`
Prev | Chapter 17. Sequences | Next

## 17.4. Functions `SORT` & `STABLE-SORT`

`SORT` and `STABLE-SORT` accept two additional keyword arguments `:START` and `:END`:

    (SORT sequence predicate &KEY :KEY :START :END)
    (STABLE-SORT sequence predicate &KEY :KEY :START :END)

`SORT` and `STABLE-SORT` are identical. They implement the mergesort algorithm. Worst case complexity: `O(n*log(n))` comparisons, where `n` is the `LENGTH` of the subsequence bounded by the `:START` and `:END` arguments.

| These notes document CLISP version 2.45 | Last modified: 2008-05-14

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
17.3. Functions `REMOVE` & `DELETE` | Home | Chapter 18. Hash Tables