I want to check whether the number of a given list is 0 or not, but my code returns EmptyList cannot be cast to clojure.lang.IFn.
(defn fun [ls]
(println ls)
(println "hello")
(println (count ls))
(if (<= 0 (count (ls))) true
(println "testing")))
#'user/fun
user=> (fun '())
()
hello
0
ClassCastException clojure.lang.PersistentList$EmptyList cannot be cast to clojure.lang.IFn user/fun (form-init4069658807942123979.clj:5)
Is there any one can help me out? Thank you so much!