def nat.go
import emerging-ezjson@1.3.0.0/src/fixed.bend as Fixedimport Base
94# decimal digits read onto acc, most significant first
95def nat.go(txt: String, acc: Nat) -> Nat:
96 match txt:
97 case SNil{}:
98 acc
99 case SCon{hd, tl}:
100 nat.go(tl, Nat.add(Nat.mul(acc, 10n), digit.nat(hd)))