In Practical Common Lisp's Chapter 8, Macros: Defining Your Own, we define a macro with-gensyms
as follows:
(defmacro with-gensyms ((&rest names) &body body)
`(let ,(loop for n in names collect `(,n (gensym)))
,@body))
What is the purpose of the (&rest names)
? If we replace it with just names
, the effect seems to be the same. In both cases we pass in a list of symbols to be "gensym-ed".
((&rest args))
when we expectargs
to be a list? – Prakash