compare-by<

[procedure] compare-by< lt-pred [x y]

[procedure] compare-by> gt-pred [x y]

[procedure] compare-by<= le-pred [x y]

[procedure] compare-by>= ge-pred [x y]

[procedure] compare-by=/< eq-pred lt-pred [x y]

[procedure] compare-by=/> eq-pred gt-pred [x y]

SRFI-67: If optional arguments x and y are present then these are compared with respect to the total order defined by the predicate(s) given; the result is in {-1, 0, 1}. If x and y are not present then a procedure comparing its two arguments using the predicate(s) given is constructed and returned.

The predicate procedures mean the following: (lt-pred x y) tests if x < y, le-pred tests for <, gt-pred for >, ge-pred for >, and eq-pred tests if x and y are equivalent. The result returned by a predicate procedure is interpreted as a Scheme truth value (i.e. #f is false and non-#f is true).