Handbook
Glossary
(write-leb128) ( n quot: ( b -- ) -- )
Vocabulary
leb128
.
private
Inputs
n
an
object
quot
a
quotation
with stack effect
( b -- )
Outputs
None
Definition
USING:
combinators
kernel
math
;
IN:
leb128.private
::
(write-leb128)
( n quot: ( b -- ) -- )
n
[
[
-7
shift
dup
]
[
127
bitand
]
bi
:>
( i b )
{
{
[
i 0
=
]
[
b 6
bit?
]
}
{
[
i -1
=
]
[
b 6
bit?
not
]
}
[
t
]
}
cond
b
over
[
128
bitor
]
when
quot
call
]
loop
drop
;
inline