It seems as though I'm having problems accessing Integer.parseInt
in comp. I can access it normally like this:
user=> (Integer/parseInt "123")
123
But if I put it in comp, I get an error:
user=> (def vect-to-int (comp Integer/parseInt (partial apply str)))
java.lang.Exception: Unable to find static field: parseInt in class java.lang.Integer (NO_SOURCE_FILE:3)
It sounds to me like it's trying to find a field on Integer when it should be looking for a method. How can I use Integer.parseInt
like this? And is there a better way to convert a vector of chars into an int
?