def intn_z
import bend-collections@1.0.0.0/src/math/random/rand.bend as Randimport Base
import bend-collections@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)))