I want to expand (foo a b c d e ...) to ===> (bar 'a 'b 'c 'd 'e ...)
So far I only get this solution:
(defmacro foo (a1 &rest a2)
`(bar ',a1 '(,@a2)))
But it results in:
(foo a b c d) ===> (bar 'a '(b c d))
which is not what I want.
Does anyone have any idea?
'whateveris shorthand for(quote whatever). If you have a list of symbols like A, B, C, D, etc, and you want a list that contains the structure(bar (quote a) (quote b) (quote c) ...), you can do something like this: