Skip to content

Comment on Maybe Everything Is a Coroutineparent

Comments

I used to argue that lazy evaluation and coroutines were kind of two sides of the same coin. That in a way, partially evaluated haskell functions were equivalent to concurrent execution.

It's just the way we force the results to appear that differs.

IO Monad, if you squint, is extremely similar.

Continuations are a different way to "store a procedure and state" (like a partially evaluated function in a lazy sense).

It's not totally obvious, but it's a lot of fun to think about how these things are all related.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.