2 ms·
In fact, MacCarthy invented a multi-branch conditional construct which in M-expressions looked like [test1 -> value1; test2 -> value2; T -> default] The S-e
by kazinator 2y ago
In fact, MacCarthy invented a multi-branch conditional construct which in M-expressions looked like
[test1 -> value1; test2 -> value2; T -> default]
The S-expression form was cond:
(cond (test1 value1) (test2 value2) (T default))
The if macro came later, defined in terms of cond.
Macros are no operationally distinguishable from special operators. You know that a form is a macro because there is a binding for the symbol as a macro, and you can ask for the expansion.
Because macros expand to code that may contain special forms that control evaluation, macros thereby exhibit control over evaluation.