llines ( stream -- result )
Lazy lists ยป Lazy list I/O

Prev:lcontents ( stream -- result )


Vocabulary
lists.lazy

Inputs
streama stream


Outputs
resulta 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

Examples
USING: io io.encodings.utf8 io.files lists lists.lazy namespaces prettyprint ; "resource:LICENSE.txt" utf8 [ 1 lfrom input-stream get llines lzip cdr car . ] with-file-reader
{ 2 "All rights reserved." }


Definition