;; Even though maps, sets, vectors and keywords behave as functions:
user=> ({:a 1} :a)
1
;; fn? still returns false for them because they are not created using fn:
user=> (fn? {:a 1})
false
(defn fn?
"Returns true if x implements Fn, i.e. is an object created via fn."
{:added "1.0"}
[x] (instance? clojure.lang.Fn x))
Comments top
No comments for fn?. Log in to add a comment.