Handbook
Glossary
stream-peek1 ( stream -- elt )
Vocabulary
io
.
streams
.
peek
Inputs
stream
an
object
Outputs
elt
an
object
Definition
USING:
accessors
io
kernel
sequences
vectors
;
IN:
io.streams.peek
:
stream-peek1
( stream -- elt )
dup
peeked>>
[
dup
stream>>
stream-read1
[
[
1vector
over
stream-clone-resizable
>>peeked
drop
]
keep
]
[
drop
f
]
if*
]
[
last
nip
]
if-empty
;