def up64

bend-collections-laws-math@1.0.0.0 · src/math/w64.bend:480

import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as W64
import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W

480def up64(fuel: Nat, +n: W.U64, +r: U32, up: Bool) -> U32:
481  match fuel up:
482    case 0n _:
483      r
484    case 1n+f False{}:
485      r
486    case 1n+f True{}:
487      up64(f, n, U32.add(r, 1), up64_ok(n, U32.add(r, 1)))

Uses (6)

Used by (2)