Scheme supports boolean?
to test whether a symbol or value is of boolean type.
(boolean? #\t)
(boolean? #\f)
While in Clojure, I can only found integer?
, number?
, list?
, etc but without boolean?
.
What is the equivalent of boolean?
in Clojure?
you could do
(defn boolean? [x]
(instance? Boolean x))