
On 27.07.2014 13:30, Chris Wong wrote:
That looks like a continuation monad to me. `C m a` can also be expressed as `Cont (Action m) a`, where Cont is from the transformers library.
I'm not sure if this fits properly here, but Continuation + Concurrency reminded me of a blog post by Neil Mitchell [1].
On Jul 27, 2014 10:48 PM, "martin"
wrote: Anyways, I believe I was able to convert that into modern haskell syntax - at least it compiles. But I have trouble to understand the Monad instance presented there. Could anyobody walk me through the bind function?
In case it's the Continuation monad Chris mentioned (and I think he's right), you might enjoy Gabriel Gonzale's blog post about the Continuation monad [2], where he gives motivation, walks through the monad itself step by step and finally gives some examples. [1] http://neilmitchell.blogspot.com.es/2014/06/optimisation-with-continuations.... [2] http://www.haskellforall.com/2012/12/the-continuation-monad.html HTH, Jochen