filterv

functionsince v0.0-1211 clojure.core/filtervEdit
(filterv pred coll)

Details:

Returns a vector of the items in coll for which (pred item) returns true.

pred must be free of side-effects.


Source docstring:
Returns a vector of the items in coll for which
(pred item) returns logical true. pred must be free of side-effects.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn filterv
  [pred coll]
  (-> (reduce (fn [v o] (if (pred o) (conj! v o) v))
              (transient [])
              coll)
      persistent!))