Expand description
Standard order of terms (ISO 8.4.2).
Order: Var < Number < Atom < Compound
- vars among themselves by heap-cell index
- numbers by value; Float < Integer when numerically equal; NaN last
- atoms alphabetically by name
- compounds by arity, then functor name, then args left-to-right
A LST cell IS the compound '.'(Head, Tail) — arity 2, functor “.”.
We treat it as such so a LST and a STR with functor “.” / arity 2
compare structurally equal.
Functions§
- compare_
terms - Total standard order over two heap words (after dereferencing).