Json.u32.dig: def of bend-net-json@0.3.0.0 Import: import bend-net-json@0.3.0.0/json.bend as Json Lines 539-548 of bend-net-json@0.3.0.0/json.bend: https://jend.leeeet.dev/read.txt?path=bend-net-json@0.3.0.0/json.bend&start_line=539&end_line=548 import Base def u32.dig(s: String, +acc: U32, bad: Bool) -> Maybe<&2, U32>: match s: case SNil{}: match bad: case True{}: None{} case False{}: Some{acc} case SCon{Chr{+c}, t}: u32.dig(t, (acc * 10 + (c - 48 : U32) : U32), Bool.or(bad, Bool.or(Bool.not(digit(c)), u32.over(acc, c)))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bend-net-json@0.3.0.0/json.bend&name=digit https://jend.leeeet.dev/definition.txt?path=bend-net-json@0.3.0.0/json.bend&name=u32.over