Re:Writing a Lisp: Continuations
by mbrock on Thursday May 18, 2017 @10:35PM
(#14372659)
The linked module defines a "monad transformer" that can wrap other monads with a continuation-capturing layer. This means, among other things (Haskell's solution is awesomely general) that you can indeed use it with state, if you compose it with the state monad, or even the IO monad.
(The bottom of the documentation page has a contrived example of this.)
(The bottom of the documentation page has a contrived example of this.)