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?
Thanks.
On Jan 19, 1:45 pm, Jacek Generowicz <jacek.generow...@googlemail.com>
wrote:
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
This is also affected by direct binding. It's not documented anywhere
outside the IRC logs to my knowledge, but if you look at line 2818 of
Compiler.java you can see the criteria whereby certain vars are made
"direct", improving the call-time performance, but making it impossible
to rebind them.
Currently all vars inside a namespace that begins with clojure with root
bindings that are functions are subject to this feature, though this
criteria will hopefully change in the future.
-Phil