def draw
import bend-collections-laws-crypto@1.0.0.0/spec/math/random/rand.bend as Randimport Base
70def draw(+w: Nat, +x: Nat, n: Nat) -> Maybe<&2, Nat>:
71 match n:
72 case 0n:
73 Some{x}
74 case 1n+ +m:
75 draw_pos(w, x, 1n+m, m, Nat.is_eq(and_bits(w, 1n+m, m), 0n))
Uses (5)
Used by (18)
- bend-collections-laws-crypto@1.0.0.0/proofs/math/random/uint64n:cont
- bend-collections-laws-crypto@1.0.0.0/spec/math/random/rand:below_go
- bend-collections-laws-crypto@1.0.0.0/spec/math/random/rand:below
- bend-collections-laws-crypto@1.0.0.0/spec/math/random/rand:count
- bend-collections-laws-crypto@1.0.0.0/proofs/math/random/uint64n:hd_of
- …