You're viewing version 1.2.0 of not-empty. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

not-empty

clojure.core

  • (not-empty coll)
If coll is empty, returns nil, else coll

1 Example top

  • user=> (not-empty [])
    nil
    user=> (not-empty [1])
    [1]
    user=> (not-empty [1 3 5])
    [1 3 5]
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:4375 top

(defn not-empty
  "If coll is empty, returns nil, else coll"
  {:added "1.0"}
  [coll] (when (seq coll) coll))
Vars in clojure.core/not-empty: defn seq when
Used in 5 other vars descendants bases parents supers ancestors

Comments top

No comments for not-empty. Log in to add a comment.