That sounds reasonable. But how would you explain `pmap'? This function is not inlined. In fact, every function in clojure.core can't be bound without a declare (as far as I have tried). And it seems this problem only exists when I tried to bind the core functions. It's ok for me to substitute the functions in other namespaces.
On Sep 4, 9:22 pm, CuppoJava <[email protected]> wrote: > Your original understanding is correct. Your first example is not > working the way you expect it because Clojure is inlining "inc" for > speed purposes. > > Hope that helps > -Patrick > > On Sep 3, 11:21 pm, Yang Dong <[email protected]> wrote: > > > (binding [inc dec] > > (println (inc 1))) > > > ;=> 2 > > > If I put a declare on top of it, > > > (declare inc) > > > (binding [inc dec] > > (println (inc 1))) > > > ;=> 0 > > > Originally I thought binding is equal to thread local dynamic binding. > > Seems I was wrong. It seems like it has something to do with > > namespaces. Right? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
