The library (vicare language-extensions comparisons) implements
an infrastructure for comparison functions; it can be seen as an
extension of the standard procedures =, <, char<?
etc. The primary design aspect is the separation of representing a
total order and using it.
Since the compare procedures are often optional, comparing built in
types is as convenient as using built in function, sometimes more
convenient: For example, testing if the integer index i lies in
the integer range [0, n) can be written as (<=/<? 0 i n).
| • comparisons intro: | Introduction. | |
| • comparisons examples: | Examples. | |
| • comparisons conventions: | Terminology and conventions. | |
| • comparisons atoms: | Comparing atoms. | |
| • comparisons sequence: | Comparing lists and vectors. | |
| • comparisons pair: | Comparing pairs and improper lists. | |
| • comparisons default: | The default compare procedure. | |
| • comparisons cons: | Constructing compare procedures. | |
| • comparisons branch: | Branching. | |
| • comparisons pred: | Predicates. | |
| • comparisons minmax: | Minimum and maximum values. | |
| • comparisons debug: | Debugging procedure. |