def W64.show.go
import bend-osdev-word64@0.1.1.0/word64.bend as Word64import Base
348# the decimal digits of a, consuming one of 20 steps per digit (after a
349# reaches 0 the steps add nothing)
350def W64.show.go(n: Nat, +a: W64, acc: String) -> String:
351 match n:
352 case 0n:
353 acc
354 case 1n+p:
355 +dm = W64.small.divmod(a, 10)
356 W64.show.go(p, W64.small.q(dm), W64.show.push(W64.is_zero(a), acc, W64.small.r(dm)))