jank
jank copied to clipboard
Numeric operators misbehave when in unary position
When we use +, *, etc. (including the promotion operators) jank doesn't make sure that the passed in values are actually numeric.
user=> (* :k)
:k
While Clojure attempts to cast the passed in value to a java.lang.Number.
user=> (* :k)
Execution error (ClassCastException) at java.lang.Class/cast (Class.java:3492).
Cannot cast clojure.lang.Keyword to java.lang.Number