I am trying to get a clojure function to determine if a passed value is a map. For example,
user=> (if-map {:foo 1}) ;Should return true true user=> (if-map "hello") ;Returns false false
Is there a ready-made function?
Yes map? - built-in function
map?
(map? {:a 1}) => true (map? [1]) => false