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

orders

Introduction

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

This documentation is incomplete.

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