Bytes.hex: def of bend-osdev-bytes@0.1.1.0 Import: import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytes Lines 232-239 of bend-osdev-bytes@0.1.1.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&start_line=232&end_line=239 import Base # two lower-case hex digits per byte def hex(xs: List<&2, U32>) -> String: match xs: case Nil{}: SNil{} case Con{h, t}: +b = byte(h) SCon{hex.digit(U32.shrn(b, 4n)), SCon{hex.digit(U32.and(b, 15)), hex(t)}} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=byte https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=hex.digit