[Haskell-cafe] Coroutines
Tim Newsham
newsham at lava.net
Thu Dec 18 12:39:34 EST 2008
> Andrew was recently asking about co-routines. A couple of years ago,
> I was in much the same position as him; although I am pretty sure I
> had heard the term before, it seemed like a mysterious idea with no
> practical use.
Besides the point that people have already made that lazy evaluation
gives you similar control as coroutines, I wanted to point out how
simple it is to implement coroutines. Here's a simple implementation
that ddarius made on IRC a few months back off-the-cuff. I kept
it around on codepad because its cool:
http://codepad.org/GwtS6wMj
> -- ryan
Tim Newsham
http://www.thenewsh.com/~newsham/
More information about the Haskell-Cafe
mailing list