ron at flownet.com
Tue Jun 24 08:37:14 PDT 2014
This is defined in CL to be a symtax error. The head of a form can be a symbol or a lambda expression but not a macro. You will notice that not only does this code not macroexpand, it won’t run either.
It is possible to tweak macroexpand-all and the CCL compiler so that both accept ((…) …) syntax. I’ve attached the code to do the latter; the former is left as an exercise.
On Jun 24, 2014, at 4:39 AM, Taoufik Dachraoui <dachraoui.taoufik at gmail.com> wrote:
> Is there a reason why macroexpand-all does not expand macros placed in the
> head of a list:
> ? (defmacro g (x y) `(lambda (,x) ,y))
> ? (macroexpand-all '((g x (+ x 1)) 3))
> ((G X (+ X 1)) 3)
> What if it is the case what could be the issue?
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3036 bytes
Desc: not available
More information about the Openmcl-devel