Valid Macro Recursion
(defmacro or* (&body body)
(cond ((null body) 'nil)
((null (cdr body)) (car body))
(t (let ((temp (gensym)))
`(let ((,temp ,(car body)))
(if ,temp ,temp (or* ,@(cdr body))))))))
(or* a b) expands into
(let ((#:g24 a))
(if #:g24 #:g24 b))
Previous slide
Next slide
Back to first slide
View graphic version