Hi,
I begin to study the macro-function in Lisp but there is something I 'don't understand in my push macro.
Can you help me a little ?
thanks a lot !
I begin to study the macro-function in Lisp but there is something I 'don't understand in my push macro.
(setq place '(a b c))
(defmacro mypush (element place)
(setq place '(cons 'element place)) )
(macroexpand-1 '(mypush a liste))
(cons 'element place) ;
t
It always returns me "element" as car of list, I understand why with the form to expand to, but I don't understand how to change that...Can you help me a little ?
thanks a lot !
Last edited by nuntius on , edited 1 time in total. Reason: add code tag