Stream utilities - Factor Documentation (original) (raw)
There are a few useful stream-related words which are not generic, but merely built up from the stream protocol.
First, a simple composition of stream-write and stream-nl:
stream-print ( str stream -- )
stream-lines ( stream -- seq )
read-lines ( -- seq )
each-line ( ... quot: ( ... line -- ... ) -- ... )
stream-contents ( stream -- seq )
read-contents ( -- seq )
each-block ( ... quot: ( ... block -- ... ) -- ... )