(write-leb128) ( n quot: ( b -- ) -- )


Vocabulary
leb128.private

Inputs
nan object
quota quotation with stack effect ( b -- )


Outputs
None

Definition


:: (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