1.3.0 permalink 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:4839 top

(defn not-empty
  "If coll is empty, returns nil, else coll"
  {:added "1.0"
   :static true}
  [coll] (when (seq coll) coll))
Vars in clojure.core/not-empty:
Used in 0 other vars

Comments top

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