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

Introduction

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

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

Dependencies

srfi-13

Procedures

[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 < (cut modulo <> 10)))

[procedure] (key-string< key)

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