No; functions with :inline-* metadata (go look at the source for +, for
example) are...inlined, thus eliminating var lookups, and any effect of
binding, with-redefs, etc. The workaround for this is to call through
the var:
user=> (with-redefs [+ list] (#'+ 1 2))
(1 2)
Cheers,
- Chas
On 08/
Is this a bug?
user> (with-redefs [list +] (list 1 2)) ;; expected: 3
3 ;; huzzah
user> (with-redefs [+ list] (+ 1 2)) ;; expected: (1 2)
3 ;; blast!
--
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks, which
may be sweet, aromatic, fermented or spirit-based. ..