def hex.cat
import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytesimport Base
323def hex.cat(xs: List<&2, U32>, acc: String) -> String:
324 match xs:
325 case Nil{}:
326 acc
327 case Con{h, t}:
328 +b = byte(h)
329 SCon{hex.digit(U32.shrn(b, 4n)), SCon{hex.digit(U32.and(b, 15)), hex.cat(t, acc)}}