def Int.read.step
import bend-kit-int@0.2.0.0/int.bend as Intimport Base
389def Int.read.step(+n: Nat, +b: Word(n), +r: U32, st: Maybe<&2, Word(n)>,
390 x: U32) -> Maybe<&2, Word(n)>:
391 match st:
392 case None{}:
393 None{}
394 case Some{acc}:
395 +d = {Radix.value(x) : U32}
396 Int.read.dig(U32.is_lt(d, r), n, b, acc, d)