Outdated egg!

This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for the CHICKEN 4 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.



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

This documentation is incomplete.




[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).

Not yet documented

[procedure] (key< key)
[procedure] (key> key)
[procedure] (order . cmps)
[procedure] (sort-key-cache alist cmp key)
[procedure] (pick< alist order<)
[procedure] (pick> alist order>)