I am defining a function "true-or-false" that will take an argument and print "1" if it is true and "0" if it is false but when I run my function with the argument:
(= 5 4)
it returns the error: "ClassCastException java.lang.Boolean cannot be cast to clojure.lang.IFn"
Code:
(defn true-or-false [x] (if (x)
(println "1")
(println "0")))
(def a (= 5 4))
(true-or-false a)