def draw

bend-collections-laws-math@1.0.0.0 · spec/math/random/rand.bend:70

import bend-collections-laws-math@1.0.0.0/spec/math/random/rand.bend as Rand
import 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)