Primitives

RL admits some special terms that receive special treatment.

Every term has an associated type. This potentially infinite regress is broken by the special term ^ROOT, which is the root of the type system and is its own type. Any term whose type is ^ROOT is referred to as a root term (or sometimes as a root type).

There is a special term ANY that, as a pattern, matches any subject. We may refer to ANY as the wildcard, and it may also be abbreviated _. There is also a term NONE that, as a pattern, does not match any subject. We can summarize this as follows, where t and u are arbitrary terms that are neither NONE nor ANY.

pattern subject
ANY t NONE
ANY match match match
u no match u ~ t no match
NONE no match no match no match
  • rl/primitives.txt
  • Last modified: 2019/01/09 17:33
  • by sprowell