Sum function doesn't work :/

Posted by StackedCrooked on Stack Overflow See other posts from Stack Overflow or by StackedCrooked
Published on 2010-04-30T23:11:19Z Indexed on 2010/04/30 23:17 UTC
Read the original article Hit count: 218

Filed under:

A while ago this code seemed to work, but now it doesn't anymore. Is there something wrong with it?

user=> (defn sum [a b] (a + b))
#'user/sum
user=> (sum 3 4)
java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0)
user=>

It's probably time to take a break :)

© Stack Overflow or respective owner

Related posts about clojure