random-sample

functionsince v0.0-2301 clojure.core/random-sampleEdit
(random-sample prob)
(random-sample prob coll)

Source docstring:
Returns items from coll with random probability of prob (0.0 -
1.0).  Returns a transducer when no collection is provided.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn random-sample
  ([prob]
     (filter (fn [_] (< (rand) prob))))
  ([prob coll]
     (filter (fn [_] (< (rand) prob)) coll)))