Bars (byte arrays)
Macro for creating ASCII bar literals.
# b {hello} == b#hello
# b {} == b#{}
# b {123} == b#123
Macro for creating hexadecimal bar literals.
# x deadbeef == x#deadbeef
# x 00 == x#00
# x {} == b#{}
padBar
(padBar p)
> p : Pad a
> Bar a
Converts a pad to a bar, adding zeroes to make it into whole bytes if necessary.
padBar p#11111111 == x#ff
padBar p#111111111 == x#ff01
padBar p#1 == x#01
isBar
Checks if a value is a bar (byte array).
isBar b#hello == 1
isBar x#deadbeef == 1
isBar 42 == 0
emptyBar
Returns an empty bar.
emptyBar == b#{}
barLen emptyBar == 0
barIsEmpty emptyBar == 1