def hex

gralha-text-scan@0.1.0.1 · scan.bend:249

import gralha-text-scan@0.1.0.1/scan.bend as Scan
import 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))

Uses (6)

Used by (3)