remove

clojure.core

  • (remove pred coll)
Returns a lazy sequence of the items in coll for which
(pred item) returns false. pred must be free of side-effects.

1 Example top

  • user=> (remove pos? [1 -2 2 -1 3 7 0])
    (-2 -1 0)
    
    user=> (remove #(zero? (mod % 3)) (range 1 21))
    (1 2 4 5 7 8 10 11 13 14 16 17 19 20)
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:2483 top

(defn remove
  "Returns a lazy sequence of the items in coll for which
  (pred item) returns false. pred must be free of side-effects."
  {:added "1.0"
   :static true}
  [pred coll]
  (filter (complement pred) coll))
Vars in clojure.core/remove:
Used in 0 other vars

Comments top

No comments for remove. Log in to add a comment.