def span_digits
import bend-toon-codec@0.1.0.0/src/num.bend as Numimport Base
41# Leading run of ASCII digits, and the rest.
42def span_digits(+s: String) -> Sp:
43 match s:
44 case SNil{}:
45 Sp{SNil{}, SNil{}}
46 case SCon{Chr{c}, t}:
47 sp.pick(Char.is_digit(Chr{c}), c, s, span_digits(t))