Re: [Factor-talk] newbie question: how to collect info from a stream

2015-09-01 Thread Jon Harper
Hi, Here's a simple example: https://github.com/slavapestov/factor/blob/master/extra/tzinfo/tzinfo.factor It uses with-file-reader ( http://docs.factorcode.org/content/word-with-file-reader,io.files.html ) to bind the file stream to the default input stream. It then calls read and its variants an

[Factor-talk] newbie question: how to collect info from a stream

2015-09-01 Thread HP Wei
I am just starting to learn factor. In ocaml or python, when I open a file stream, I usually set up an object with an accumulator class variable where I collect the selected info while walking through the stream (file). I am trying to look at various places to find an equivalent way of doing thi