Hi, On Jan 19, 1:45 pm, Jacek Generowicz <jacek.generow...@googlemail.com> wrote:
> (def ++ +) > (defn foo-core [a b] (+ a b)) > (defn foo-user [a b] (++ a b)) > (binding [+ - > ++ -] > [(foo-core 1 1) (foo-user 1 1)]) > > Gives the result: > > [2 0] > > which suggests that some vars are immune to binding. > > Could someone please point me to the chapter and verse describing > this? The two argument version of some functions like + or - are inlined. So in foo-core the function is inlined and the Var is actually not referenced. Try with three arguments and you will get the expected result. Sincerely Meikel
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en