def uint64n_pick

bend-collections-laws-math@1.0.0.0 · src/math/random/rand.bend:159

import bend-collections-laws-math@1.0.0.0/src/math/random/rand.bend as Rand
import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W

159def uint64n_pick(~S: Data, ~next: S -> W.U64 & S, s: S, +n: W.U64, pow2: Bool) -> W.U64 & S:
160  match pow2:
161    case True{}:
162      mask(S, n, next(s))
163    case False{}:
164      lemire_first(~S, ~next, n, draw(S, n, next(s)))

Uses (6)

Used by (3)