ClojureDocs

Nav

Namespaces

random-sample

clojure.core

Available since 1.7 (source)
  • (random-sample prob)
  • (random-sample prob coll)
Returns items from coll with random probability of prob (0.0 -
1.0).  Returns a transducer when no collection is provided.