yes, what i expected is that a macro get processed (expanded) when the lambda that contains it gets READ by s7, ie when 'define' process the (lambda ...) expr before assigning it to the variable. for example here is clisp. it might be the compiler that does it in this case (not sure) but i dont think you need to compile to expand a macro one time
$ clisp [1]> (defmacro foo (&rest args) (format t "macroexpanding foo!~%") `(list ,@args)) FOO [2]> (defun bar (a b c) (foo a b c)) macroexpanding foo! BAR [3]> (bar 1 2 3) (1 2 3) [4]> (bar 1 2 3) (1 2 3) >> >> I'm pretty sure this is the common behavior for lisp interpreters. > > Sorry, that's probably not true. > Guile only expands the first time. (even doing it twice, looks > like...) > _______________________________________________ Cmdist mailing list [email protected] http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
