Variables are sorted by address. Attaching attributes (see section
7.1) does not affect the ordering.
Numbers are compared by value. Mixed integer/float are
compared as floats. If the comparison is equal, the float is considered
the smaller value. If the Prolog flag iso
is defined, all floating point numbers precede all integers.
Strings are compared alphabetically.
Atoms are compared alphabetically.
Compound terms are first checked on their arity, then on
their functor name (alphabetically) and finally recursively on their
arguments, leftmost argument first.