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