(defmacro cond-clause (expr res)
`(,expr (push ,res res) ) )
(defmacro test (cond-expr)
`(cond ,(macroexpand-1 cond-expr) ) )
(macroexpand-1 '(test (cond-clause (equalp c 8) 1) ) )
(test (cond-clause (equalp c 8) 1) )
Konfusius wrote:Macro forms are expanded only at places where a function call may be placed. Since (COND (COND-CLAUSE (= C 8) 1)) didn't work if COND-CLAUSE was a function it also doesn't work if its a macro.
Users browsing this forum: Google [Bot] and 4 guests