[r6rs-discuss] [Formal] Add (sort) and (vector-sort!) procedures
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Tue Oct 3 18:38:03 EDT 2006
Sven.Hartrumpf at FernUni-Hagen.de writes:
> If some people are really interested in this they should revive SRFI-32,
> which has been withdrawn at a - let's say - 90% completion level.
I can't believe that R6RS needs 28 procedures about sorting.
I propose four:
(sort lst <)
(sort-by lst get-key <)
(vector-sort! vec <)
(vector-sort-by! vec get-key <)
All stable, with the algorithm unspecified (recommended N*log(N)
complexity). The "!" variants sort in place. The key should be
extracted exactly once for each element.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the r6rs-discuss
mailing list