Metaterms
A *metaterm* is a literal that represents a term. You can think of it as a fancy sort of string. Metaterms are created with the at symbol (@
, U+0040).
Consider a case where we need to know if a term is a variable. We might have an operator like is_variable
that takes a single argument and evaluates to true
when the argument is a variable, and to false
when it is not. We might use that in a lambda, but if we do, we have to *defer evaluation* until we are ready.
is_variable($x)
Here this will *immediately* be rewritten to true
because