其原因在于经济的宏观扩张
with-redefs
:
(macroexpand-1
'(with-redefs []
(if (zero? test)
"done"
(recur (dec test)))))
(with-redefs-fn {}
(fn []
(if (zero? test)
"done"
(recur (dec test)))))
因为一个新的
fn
recur
是指那个
fn公司
而不是更远的地方
loop
(这解释了arity异常)。
还有许多其他宏与“不兼容”
环
这样,因为
重现
环
,如果
重现
在宏调用内部发生时,宏可能正在操纵代码,以便
重现
不再处于尾部位置。
对于
带redefs
(loop [test 3]
(let [[recur? val]
(with-redefs []
(if (zero? test)
[false "done"]
[true (dec test)]))]
(if recur?
(recur val)
val)))