|
|
All expressions are built from various ~<expression>~ objects. These objects are specialized to contain only certain, specific information, relevant to a particular expression. The most basic expressions (besides expression itself) are ~<atomic>~ (holding things like numbers or variables) and ~<compound>~ (holding things like multiplicatinos, divisions, exponents, trigonometric expressions, arithmetic expressions, /etc./). All subtypes of ~<expression>~ must know if they are atomic, so we define a generic for this, they must also tell if they are ~eqal~ (a form of equality), and be able to perform substitution, evaluation, and simplification, however, the latter three are implemented elsewhere. The organization of the various types may be found in Figure~[[fig:expression-types]].
|
|
|
-Note, by default, ~eqal~ will handle ~type-error~ by trying to switch the order of the arguments. If this fails, it will warn that an applicable method for the given types, and return ~nil~.
|