Posted in the “I hope no-one else has to go through this” category in the hope that Google surfaces this for some other poor soul.
Picture a rather trivial split function:
(defn split [str delimiter] ((seq (.split str delimiter))))
Which helpfully spits out:
java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to clojure.lang.IFn
The issue here is the additional set of parentheses – a hang-over from a previous edit. Removing this fixed the trouble. These parentheses were causing Clojure to expect a function call…
One Response to “In Clojure, Those Parenthesis Really Matter”
Thanks for the tip. Re the title: If they’re plural, then they’re parenthesEs.