The fundamental concept of continuations

gnuist006 at gmail.com gnuist006 at gmail.com
Tue Oct 9 02:24:05 EDT 2007


On Oct 8, 10:59 pm, Barb Knox <s... at sig.below> wrote:

>
> Lambda calculus.  Instead of function A returning to its caller, the
> caller provides an additional argument (the "continuation") which is a
> function B to be called by A with A's result(s).  In pure "continuation
> style" coding, nothing ever "returns" a result.
>
> It is easy to mechanically transform normal function-style lambda
> calculus into continuation-style, but the reverse is not so.
>

Explanation and reference please

>
> You can have a "spaghetti stack", or keep continuation data-structures
> in the heap.

A picture, diagram? a picture is worth a thousand words





More information about the Python-list mailing list