From Imperative to Pure FP and Back: Monads vs. Scoped Continuations (blog.paralleluniverse.co)