You are looking at historical revision 8735 of this page. It may differ significantly from its current revision.


The orders egg provides functions useful for defining orders for sorting.

There's no documentation about it right now. Sorry. :-(




[procedure] (cmp-key cmp key)

Generates an ordering procedure that applies the 'key' proc to both sort candidates, and compares the resulting keys using the 'cmp' procedure.

E.g. to sort a list of integers based on their value modulo-10: (sort my-numbers (cmp-key < (cut modulo <> 10)))

[procedure] (key-string< key)

Generates an ordering procedure (see cmp-key) that sorts strings using string< (defined in SRFI-13).