dcreager.net

Continuation passing style (CPS)

A programming language rewrite in which functions never return; instead they receive an additional continuation parameter, which they invoke to return control back to the caller. This often requires a rewrite step that turns a program “inside out” to build up these continuations.

“How to compile continuations” [Might]

“Into CPS, never to return” [Bernstein]

[Baker1995] CONS should not CONS its arguments, part II: Cheney on the M.T.A.

» Theory