In haskell, continuations have been right in front of your eyes all the time, Use then to undo actions by means of the backtracking effect added to the the hardworking programmer EDSL.
#A word on continuations# In Haskell, the continuation is the second parameter in the bind operation. While most languages that use imperative and eager execution have to resort to continuations to implement special kinds of flows -so the continuation play a central role in them- haskell has not such problem: It uses continuations natively; The monad instance define what each kind of computation has to do with these continuations.
a bind has two parameters: a closure and a continuation.
x >>=(f1>>=(f2 >>=f3))
So at every moment you know what is the continuation. In any monad. You don't need any special Cont
structure for this!!!. It is right there, in the monad instance: