3 ms·
Yes, this is a standard technique. It's more or less recovering the trampoline monad via continuations as a universal monad. You can use the same technique to i
by lmm 5y ago
Yes, this is a standard technique. It's more or less recovering the trampoline monad via continuations as a universal monad. You can use the same technique to implement other effects as well, if you're working in the kind of crazy language that has continuations but no monads.