マクロを組むときには変数捕捉に気をつけないといけないが、実は変数捕捉をうまく使う方法もあって、On Lispにそんな例が載っている。 http://www.komaba.utmc.or.jp/~flatline/onlispjhtml/anaphoricMacros.html 一番簡単な例としては、アナフォリックIFがある。 (defmacro aif (test-form then-form &optional else-form) `(let ((it ,test-form)) (if it ,then-form ,else-form))) (aif (big-long-calculation) (foo it)) この例では、比較結果である変数itを捕捉し、aifのthen-form内で使えるようにする。 Clojureでは少し長くなって、 (defmacro aif ([test-