def intn_z

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

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

205def intn_z(~S: Data, ~next: S -> W.U64 & S, s: S, +n: Nat, z: Bool) -> Nat & S:
206  match z:
207    case True{}:
208      (0n, s)
209    case False{}:
210      to_nat(S, uint64n(~S, ~next, s, nat64(n)))

Uses (8)

Used by (3)