Sorting

Procedures sort and sort!

(sort list less?) => list
(sort vector less?) => vector
(sort! list less?) => list
(sort! vector less?) => vector

These procedures sort their argument (a list or a vector) according to the predicate less?, which must implement a total order on the elements in the data structures that are sorted.

Sort returns a fresh data structure containing the sorted data; sort! sorts the data structure in-place.


$Id: sorting.html,v 1.2 1998/12/19 16:22:28 lth Exp $
larceny@ccs.neu.edu