Handbook
Glossary
(with-length-prefix) ( quot: ( .. -- .. ) length-quot: ( bytes-written -- length ) -- )
Vocabulary
bson
.
private
Inputs
quot
a
quotation
with stack effect
( .. -- .. )
length-quot
a
quotation
with stack effect
( bytes-written -- length )
Outputs
None
Definition
USING:
accessors
alien.accessors
combinators
io
kernel
;
IN:
bson.private
:
(with-length-prefix)
( quot: ( .. -- .. ) length-quot: ( bytes-written -- length ) -- )
[
[
B{
0 0 0 0
}
write
]
prepose
with-length
]
dip
swap
[
( written -- length )
call-effect
get-output
underlying>>
]
dip
set-alien-unsigned-4
;
inline