Delimited continuations? Though I'm not totally clear what you're asking for. Semantics or syntax?

Syntax. Delimited continuations would be a similar concept but for semantics

[deleted]