"zipping" two streams in the IO monad
Thu, 19 Sep 2002 21:28:31 +0100
On Thu, 19 Sep 2002 22:06:59 +0200
Nick Name <firstname.lastname@example.org> wrote:
> In general, how does one implement a function like "getChanContents"
> wich returns an infinite list? Tell me just some pointer to information
> of course, I don't want an entire functional programming lesson :)
This is how getContents is implemented so that it reads the file lazily.
It is "unsafe" in that it doesn't guarantee any particuar order of evaluation with respect to other IO operations.