def Nar.show.go

bend-kit-int@0.2.0.0 · int.bend:513

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

513# Digits of x in radix r, most significant first; fuel f bounds them.
514def Nar.show.go(f: Nat, +r: U32, acc: String, z: Bool, +x: U32) -> String:
515  match f:
516    case 0n:
517      acc
518    case 1n+g:
519      match z:
520        case True{}:
521          acc
522        case False{}:
523          +q = {U32.div(x, r) : U32}
524          Nar.show.go(g, r, SCon{Radix.digit(U32.mod(x, r)), acc},
525            U32.is_zero(q), q)

Uses (8)

Used by (1)