FACTOID # 117: In Germany and Italy, every second person owns a car.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Call with current continuation
This page is about the computer science continuation. See analytic continuation for the use of the term in complex analysis; see Continuation War for the Finno_Soviet conflict during World War II; and see continuation application for the special type of patent application.

In computing, a continuation is a way to represent the execution state (i.e. the stack) of a program at a given point. Many languages have constructs that allow a programmer to save the current state as a continuation, and then to resume execution from that state at a later point in time. This technique is typical of functional programming, but in fact many programming languages exhibit such a feature under various names; specifically:

Support for continuations varies widely. A programming language supports re-entrant or first-class continuations if a continuation may be invoked repeatedly to re-enter the same context. (This use of the term "re-entrant" is distinct from its use in discussions of multitasking.)


If a continuation may only be used to escape the current context to a surrounding one, the language supports escape continuations. Many languages which do not explicitly support continuations support exception handling, which is equivalent to escape continuations and can be used for the same purposes. C's setjmp and longjmp are also equivalent: they can only be used to unwind the stack, not to restore a previously saved continuation.


First_class continuations can also be used to implement tail-call optimization. The presence of both first-class continuations and guaranteed tail-call optimization is one of the distinctions of the Scheme programming language from other Lisp languages.


Many programmers who are unaccustomed to continuations find them difficult to understand. In fact, the esoteric programming language Unlambda includes call-to-current-continuation as one of its features solely because of its resistance to understanding. The external links below illustrate the concept in more detail.


Continuations are also closely related via the Curry_Howard isomorphism to double negation translations from classical logic to intuitionistic logic and Peirce's law.


See also

External links



  Results from FactBites:
 
Continuation - Wikipedia, the free encyclopedia (755 words)
In computing, a continuation is a representation of the execution state of a program (for example, the call stack or values of variables) at a certain point.
Continuations are also used in models of computation including the Actor model, process calculi, and the lambda calculus.
Continuations are the functional expression of the GOTO statement, and the same caveats apply.
Call-with-current-continuation - Wikipedia, the free encyclopedia (481 words)
The continuation behaves like an ordinary function, except that it does not return inside the caller; instead, control flow continues after the call to call/cc.
However, when f is passed to call/cc (as in the last line of the example), applying the parameter (the continuation) to 1 forces execution the program to jump to the point where call/cc was called and causes call/cc to return the value 1.
The power of call/cc lies in the ability for the continuation to be called more than once and even from outside the lexical context of the call/cc construction: there are no rules stating that the continuation has to "stay inside" call/cc.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.