In the following when macro:
(defmacro when (condition &rest body)
`(if ,condition (progn ,@body)))
Why is the there an at sign?
In the following when macro:
(defmacro when (condition &rest body)
`(if ,condition (progn ,@body)))
Why is the there an at sign?
The
@
can also be thought of deconstructing the list and appending it to the list appears in as described in Practical Common Lisp.is the equivalent of:
which produces:
It's very easy to see the difference by making a little experiment
As you can see the use of
,@
will place the elements of the list directly inside in the expansion. Without you get instead the list placed in the expansion.