r/purescript • u/Unable_Breadfruit • Oct 22 '19
How does the continuation monad work?
https://maxhallinan.com/posts/2019/10/22/how-does-the-continuation-monad-work/
13
Upvotes
r/purescript • u/Unable_Breadfruit • Oct 22 '19
View all comments
3
u/amalloy Oct 23 '19
This doesn't cover the thing about Cont that I always have trouble with: what do I use it for, and how? For other monads it's easy: I want to model state, so I use State; my computation may fail, so I use Maybe, or Either e. For Cont I...want to write functions in continuation-passing style? Why? What programs are easy to write with Cont that would be hard without it?