A style of programming in which every user function f takes an extra argument c known as a continuation. Whenever f would normally return a result r to its caller, it instead returns the result of applying the continuation to r.
In functional programming, continuation-passing style is a style of programming in which control is passed explicitly in the form of a continuation. Gerald Jay Sussman and Guy L. Steele, Jr. coined the phrase in AI Memo 349, which sets out the first version of the Scheme programming language. John C. Reynolds gives a detailed account of the numerous discoveries of continuations. A function written in continuation-passing style takes an extra argument: an explicit "continuation" i.e. a function of one argument. When the CPS function has computed its result value, it "returns" it by calling the continuation function with this value as the argument. That means that when invoking a CPS function, the calling function is required to supply a procedure to be invoked with the subroutine's "return" value. Expressing code in this form makes a number of things explicit which are implicit in direct style. These include: procedure returns, which become apparent as calls to a continuation; intermediate values, which are all given names; order of argument evaluation, which is made explicit; and tail calls, which is simply calling a procedure with the same continuation, unmodified, that was passed to the caller.
The numerical value of continuation-passing style in Chaldean Numerology is: 8
The numerical value of continuation-passing style in Pythagorean Numerology is: 6
Images & Illustrations of continuation-passing style
Find a translation for the continuation-passing style definition in other languages:
Select another language:
Discuss these continuation-passing style definitions with the community:
Word of the Day
Would you like us to send you a FREE new word definition delivered to your inbox daily?
Use the citation below to add this definition to your bibliography:
"continuation-passing style." Definitions.net. STANDS4 LLC, 2018. Web. 24 Jan. 2018. <http://www.definitions.net/definition/continuation-passing style>.