Matthew Danish <[EMAIL PROTECTED]> writes:

> (2) There are no guarantees on when or how many times a macro will
> be expanded, except that it will happen before the form is compiled
> or evaluated.

Just to add some details.  The macro expander is called twice in the
example because CMUCL has (sort of) two interpreters.  The first
interpreter is very simple and deals only with simple but common
cases, the second interpreter is basically the first stage of the
compiler (see EVAL for details).  The simple interpreter macroexpands
your example and decides that it can't handle it and passes the
unexpanded form to the second interpreter and so the form gets expanded
a second time.

Helmut.

Reply via email to