def basic.hex
import emerging-eztoml@0.9.0.0/main.bend as EmergingEztomlimport Base
209# four lowercase hex digits of a code point, then the \u introducer, reversed
210def basic.hex(+uu: U32, out: List<&2, Char>) -> List<&2, Char>:
211 hex.char(U32.mod(uu, 16)) <> (hex.char(U32.mod(U32.shrn(uu, 4n), 16)) <>
212 (hex.char(U32.mod(U32.shrn(uu, 8n), 16)) <>
213 (hex.char(U32.mod(U32.shrn(uu, 12n), 16)) <> ('u' <> ('\\' <> out)))))