Beginning to look at continuations

I’ve always thought of continuations as a really brilliant solution looking for a problem. I know there are numerous problems it solves, but I mean it on a personal level. I’ve never had a problem where continuations was the solution. Recently I’ve come to believe that it might be because I don’t understand them very well :-)

I just spent a couple of hours reading about continuations and thought I’d offer a little reading guide for other curious people. If I were to start over I wish I had found the Wikibook chapter on Haskell/Continuation passing style first, I think it fully debunk the myth that continuations is something complication. After that it’s easier to tackle the article titled Talk:Haskell/Continuation passing style. The Haskell Wiki article on continuations is indeed right in saying that Wikipedia’s decription of continuations is rather good. I suspect that the chapter on Continuations found in All About Monads will be an excellent refresher in a few weeks when my brain has managed to suppress what I’ve so painstakingly pushed into it tonight.

This little research expedition happened because I’ve had a nagging suspicion that continuations might offer a more elegant implementation for some code I’ve been toying with for a little while now. Well, we’ll see.


I’ve had times when I felt that continuations were a good solution to my problem. So when I started using Haskell I thought that continuations might be a good solution in that language too. But it turned out that in each case, Haskell also provided another solution that was much better. For example continuations can give a nice way to implement backtracking search. But the list monad does that already in Haskell.

Leave a comment