Define-macro & setf/$it
Posted: Wed Nov 12, 2008 7:25 pm
Hi Lutz,
Why is this behaviour?
'setf does evaluate the expression, so inside the macro
i would expect this to work. but i dont understand why not..
When I replace $it with (args 0) it also doesnt work..
..Probably a very logical explanation here..
-> (define-macro (z) (setf (args 0) (string $it)) )
(lambda-macro () (setf (args 0) (string $it)))
-> (z hello world)
ERR: no symbol reference found
->
Edit: Is it because (args) does not refer ? But i would expect this to be handled like a list..
Why is this behaviour?
'setf does evaluate the expression, so inside the macro
i would expect this to work. but i dont understand why not..
When I replace $it with (args 0) it also doesnt work..
..Probably a very logical explanation here..
-> (define-macro (z) (setf (args 0) (string $it)) )
(lambda-macro () (setf (args 0) (string $it)))
-> (z hello world)
ERR: no symbol reference found
->
Edit: Is it because (args) does not refer ? But i would expect this to be handled like a list..