How to write a lazy variant ?

Alastair David Reid
04 Dec 2001 17:17:58 -0700

> I hate to followup to myself, but looks like I had to. I really was
> too tired and lazy version could be obtained by simple use of
> accumulator:

Are you _sure_ that's all it takes?

I was expecting that you'd need 'unsafeInterleaveIO'.  (This function
is used to implement hGetContents.  Some info about it shows up under
google and in john launchbury and simon peyton jones' paper on lazy
functional state threads (section 7.2)).

Alastair Reid