File: reservoir_sample.repl

package info (click to toggle)
data-generators-clojure 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 164 kB
  • sloc: xml: 22; sh: 20; makefile: 14
file content (4 lines) | stat: -rw-r--r-- 135 bytes parent folder | download
1
2
3
4
(require '[clojure.data.generators :as gen])

;; should have all 6
(frequencies (repeatedly 1000 #(gen/reservoir-sample 1 (range 6))))