def count
import bend-collections-laws-math@1.0.0.0/spec/math/random/rand.bend as Randimport Base
84# the number of source outputs x < N that draw k
85def count(+w: Nat, +n: Nat, +k: Nat, N: Nat) -> Nat:
86 match N:
87 case 0n:
88 0n
89 case 1n+ +x:
90 Nat.add(count(w, n, k, x), hit(draw(w, x, n), k))
Uses (4)
Used by (6)
- bend-collections-laws-math@1.0.0.0/proofs/math/random/lemire:count_mask
- bend-collections-laws-math@1.0.0.0/proofs/math/random/lemire:lemire_count
- bend-collections-laws-math@1.0.0.0/proofs/math/random/lemire:sum_lemire
- bend-collections-laws-math@1.0.0.0/proofs/math/random/lemire:unbiased
- bend-collections-laws-math@1.0.0.0/proofs/math/random/lemire:unbiased_c
- …