Hacker News new | ask | show | jobs
by autumn-antlers 1282 days ago
Oh, and a note on why you'd want this: while you may be able to construct a superficially similar example by expecting call/cc to return a thunk and evaluating it at the call-site, you can't always control the call-site and might be using one continuation in multiple contexts.

The try/catch implementation on page two of A Better API for First Class Continuations show-cases a specific use-case (albeit in the form of continuation-graft), though I'm still staring at it and trying to figure out if a few more parens and thunks wouldn't do the trick (more verbosely) in that context.