I don't understand the difference between fn and fn* . After some brief experimenting in the REPL, they seem to behave exactly the same, the only difference being that fn* is what comes out of macro expanding the #( macro
Is there a reason that the #( macro doesn't expand to plain old fn?
Comments
I don't understand the difference between fn and fn* . After some brief experimenting in the REPL, they seem to behave exactly the same, the only difference being that fn* is what comes out of macro expanding the #( macro
Is there a reason that the #( macro doesn't expand to plain old fn?
fn is a macro that knows how to apply destructuring rules, fn* is a primitive read by the clojure compiler and cannot apply destructuring rules.
https://github.com/clojure/clojure/blob/master/src/clj/cloju...
fn itself is a macro, fn* is a symbol defined at the compiler level: