def hex.value
import yaml-for-bend@0.1.1.0/scan.bend as Scanimport Base
224def hex.value(s: String, acc: U32) -> U32:
225 match s:
226 case SNil{}:
227 acc
228 case SCon{c, t}:
229 hex.value(t, U32.add(U32.mul(acc, 16), hex.digit(c)))