Re: Memory use of sort! Aubrey Jaffer 13 Nov 2006 00:10 UTC

 | Date: Tue, 07 Nov 2006 13:52:04 +0100
 | From: =?ISO-8859-1?Q?Jens_Axel_S=F8gaard?= <xxxxxx@soegaard.net>
 |
 | The specification of sort! reads:
 |
 |    Function: sort! sequence less?
 |    Function: sort! sequence less? key
 |
 |        Returns list, array, vector, or string sequence which has
 |    been mutated to order its elements according to less?. Given
 |    valid arguments, it is always the case that:
 |
 |        (sorted? (sort! sequence less?) less?) => #t
 |
 | Would be possible to add that the sorting is in-place?

Just before the specification of SORTED? is:

  The `!' variants sort in place; sort! returns its sequence argument.