Christopher Howard | 18 Aug 01:01 2013

continuations and monads

Q: Are the "continuations" in Scheme related to the "monads" from 
Haskell? If so, could someone elaborate on that?
Tikhon Jelvis | 18 Aug 01:08 2013
Picon

Re: continuations and monads

Yes they are. Purely intuitively, you can see how writing code in a monadic style (using >>= a lot) is very similar to writing in continuation-passing style.

You can express this the most directly with the continuation monad. Then, from this monad, you can express other monads. In some sense, the continuation monad is very fundamental. Take a look at "The Mother of all Monads"[1] from The Neighborhood of Infinity for more details.

[1]: http://blog.sigfpe.com/2008/12/mother-of-all-monads.html?m=1

On Aug 17, 2013 7:02 PM, "Christopher Howard" <christopher.howard <at> frigidcode.com> wrote:
Q: Are the "continuations" in Scheme related to the "monads" from Haskell? If so, could someone elaborate on that?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane