function | since v0.0-927 | clojure.core/empty? | Edit |
(empty? coll)
Returns true if coll
has no items - same as (not (seq coll))
.
Please use the idiom (seq x)
rather than (not (empty? x))
.
Returns true if coll has no items. To check the emptiness of a seq, please use the idiom (seq x) rather than (not (empty? x))
(defn empty?
[coll]
(cond
(nil? coll)
true
(satisfies? ICounted coll)
(zero? (-count coll))
:else
(not (seq coll))))