Next: , Previous: , Up: lang   [Index]

1.17 Comparison functions

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