Handbook
Glossary
lcontents ( stream -- result )
Lazy lists
ยป
Lazy list I/O
Next:
llines ( stream -- result )
Vocabulary
lists
.
lazy
Inputs
stream
a stream
Outputs
result
a
string
Word description
Returns a lazy list of all characters in the file.
car
returns the next character in the file,
cdr
returns the remaining characters as a lazy list.
nil?
indicates end of file.
See also
llines
Definition
USING:
io
;
IN:
lists.lazy
:
lcontents
( stream -- result )
f
f
[
stream-read1
]
<lazy-io>
;