2011/12/1 Stuart Sierra
> > Do I understand correct that the only way to hook
> > a recursive function without affecting other
> > threads is to annotate the function with
> > ^{:dynamic true} and call it via #'fact?
>
> If you want to you dynamic rebinding, yes.
>
> There are other possibilities
> Do I understand correct that the only way to hook
> a recursive function without affecting other
> threads is to annotate the function with
> ^{:dynamic true} and call it via #'fact?
If you want to you dynamic rebinding, yes.
There are other possibilities, however. Maybe you could pass the func
Thanks for the reply, Nils.
2011/12/1 Nils Bertschinger
> Hi Roman,
>
> as far as I understand, the Clojure compiler is doing some
> optimizations for recursive functions to save the variable lookup.
> This means that you have to explicitly write the recursive call as
> (#'fact (dec n)) if you w
Hi Roman,
as far as I understand, the Clojure compiler is doing some
optimizations for recursive functions to save the variable lookup.
This means that you have to explicitly write the recursive call as
(#'fact (dec n)) if you want to dynamically rebind the function.
Somehow this doesn't feel righ