continuation magic - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Sandy Maguire

now that yall are continuation experts from the video call, wondering if there is a trick to get two separate continuations to share a piece of state. given continuation k i'd like to transform it into k' such that k' must be called twice before it runs k

Sandy Maguire

eg k () = print "hello", k' = ??? k, then k' () >> print "yo" >> k' () should result in "yo", "hello"

Sandy Maguire

but also without using ST or IO