Handbook
Glossary
maybe-read ( n limited-stream quot: ( n stream -- seq/f ) -- seq/f )
Vocabulary
io
.
streams
.
limited
.
private
Inputs
n
an
object
limited-stream
an
object
quot
a
quotation
with stack effect
( n stream -- seq/f )
Outputs
seq/f
an
object
Definition
USING:
accessors
kernel
math
;
IN:
io.streams.limited.private
:
maybe-read
( n limited-stream quot: ( n stream -- seq/f ) -- seq/f )
[
adjust-limited-read
]
dip
pick
0
<=
[
3drop
f
]
[
[
stream>>
]
dip
call
]
if
;
inline