<=> ( obj1 obj2 -- <=> )
Factor handbook > The language > Objects > Linear order protocol

Next:>=< ( obj1 obj2 -- >=< )


Vocabulary
math.order

Inputs and outputs
obj1an object
obj2an object
<=>an ordering specifier


Generic word contract
Compares two objects using an intrinsic linear order, for example, the natural order for real numbers and lexicographic order for strings.

The output value is one of the following:
+lt+ - indicating that obj1 precedes obj2
+eq+ - indicating that obj1 is equal to obj2
+gt+ - indicating that obj1 follows obj2


See also
>=<

Definition

GENERIC: <=> ( obj1 obj2 -- <=> )


Methods