Re: A style question



On Wed, 28 Feb 2007 02:08:39 +0000, Lars Rune Nøstdal wrote:

(defmacro cond* (&body body)
`(let ((any-clause-p nil))


Yup; I forgot the gensym:


(defmacro cond* (&body body)
(let ((any-clause-p (gensym)))
`(let ((,any-clause-p nil))
,@(mapcar (lambda (clause-form)
(if (eq :unless-till-now (first clause-form))
`(unless ,any-clause-p ,(second clause-form))
`(when ,(first clause-form)
,(second clause-form)
(setf ,any-clause-p t))))
body))))

--
Lars Rune Nøstdal
http://nostdal.org/
.