In case people were wondering, the haskell stdlib answer to his interview question is at https://hackage.haskell.org/package/transformers-0.5.2.0/doc... (ContT is a generalized form which lets people run, for example, computations that involve IO). Though explaining it is still the fun part.