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


1.17.7 The default compare procedure

It is convenient to have a compare procedure readily available for comparing most builtin types.

Function: default-compare obj1 obj2

Compare the arguments by type using the ordering:

null < pair   < boolean < char   < string
     < symbol < number  < vector < other

Two objects of the same type type are compared as type-compare would, if there is such a procedure. The type null consists of the empty list. The effect of comparing two other objects or of comparing cyclic structures (made from lists or vectors) is unspecified.