Next: srfi ilists procs iterthunks, Previous: srfi ilists procs apply, Up: srfi ilists procs [Index]
The following syntactic bindings are exported by the library
(srfi :116 comparators)
.
The ipair-comparator
object is a SRFI-114 comparator suitable
for comparing ipairs. Note that it is not a procedure. It compares
pairs using default-comparator
on their cars. If the cars are
not equal, that value is returned. If they are equal,
default-comparator
is used on their cdrs and that value is
returned.
The ilist-comparator
object is a SRFI-114 comparator suitable
for comparing ilists. Note that it is not a procedure. It compares
ilists lexicographically, as follows:
default-comparator
, then
the result is the result of that comparison. Otherwise, the icdrs are
compared using ilist-comparator
.
Return a comparator that compares pairs first on their cars using car-comparator. If the cars are equal: it compares the cdrs using cdr-comparator. The hash function makes use of both the car and the cdr.
Return a comparator suitable for comparing ilists using element-comparator to compare the elements.
Return a comparator that compares arbitrary objects as follows: the empty list precedes all ipairs, which precede all other objects. Ipairs are compared as if with:
(make-ipair-comparator comparator comparator)
All other objects are compared using comparator.
Return a comparator that compares ipairs on their icars alone using comparator.
Return a comparator that compares ipairs on their icdrs alone using comparator.
Next: srfi ilists procs iterthunks, Previous: srfi ilists procs apply, Up: srfi ilists procs [Index]