[Haskell-cafe] Re: IO in lists

Ferenc Wagner wferi at niif.hu
Fri Jan 19 05:19:16 EST 2007

Magnus Therning <magnus at therning.org> writes:

> Thanks for all the excellent answers to my original question.  Somehow
> it feels like I advanced and got one level closer to a black belt in
> Haskell due to this; I've now legitimately used a function from
> System.IO.Unsafe :-)
> I tried to document it all: http://therning.org/magnus/archives/249

I wonder whether the unsafeInterleaved solution is guarranteed to work
as per your specification.  Couldn't it read a character, write it,
then read three characters, write two, read one more then write two
again, and so on?  It has to catch up at the end, but needn't stay
synchronized during the process, perhaps...

More information about the Haskell-Cafe mailing list