Why does
(macroexpand '(.. arm getHand getFinger))
expand to
(. (. arm getHand) getFinger)
while
(macroexpand '(-> arm getHand getFinger))
expands to
(getFinger (clojure.core/-> arm getHand))
In other words, why is the -> not expanding fully in the second example?
macroexpand only expands the form until the symbol in the function position is not a macro. The reason why you notice this in the case of -> is because the -> macro is recursive.
In your case, you want macroexpand-all form clojure.walk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With