The interesting part of this whole thing to me is that you can get composition between your continuations without using something like Monad Transformers[1].<p>However, the part that I haven&#x27;t been able to get past yet is that monads are not closed over composition (so there exist some monads that are no longer monads when you compose them).
If it turns out that monads and delimited continuations are duals then it seems that there ought to be some continuations that compose only to yield invalid results.  (With the alternative being that scoped continuations always compose which suggests something odd is going on.)<p>I haven&#x27;t worked through the math yet because it looks suspiciously dreadful, but if anyone knows why scoped continuation composition <i>is</i> closed I would appreciate your input.<p>[1] - the most disappointing thing about monads to me.