def hex
import gralha-text-scan@0.1.0.1/scan.bend as Scanimport Base
249def hex(s: String, acc: U32) -> U32:
250 match s:
251 case SNil{}: acc
252 case SCon{Chr{c}, t}: hex(t, (acc * 16 + hex.digit(c) : U32))
import gralha-text-scan@0.1.0.1/scan.bend as Scanimport Base
249def hex(s: String, acc: U32) -> U32:
250 match s:
251 case SNil{}: acc
252 case SCon{Chr{c}, t}: hex(t, (acc * 16 + hex.digit(c) : U32))