Computer Dictionary Online

Medical Dictionary   Law Dictionary   Legal Dictionary   Website Design

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z 


call-with-current-continuation

<Lisp, programming> (call/cc) A Lisp control function that takes a function f as its argument and calls f, passing it the current continuation, which is itself a function, k. k, which represents the context of the call to call/cc, takes the result of call/cc (which is the result of f) and returns the final result of the whole program. Thus if, for example, the final result is to print the value returned by call/cc then anything passed to k will also be printed.

E.g, in Scheme:

	 (define (f k)
		 (k 1)
		 (k 2)
		 3)


	 (display (call-with-current-continuation f))


Will display 1.

(2001-04-27)


Contact the Computer Dictionary Online  ::  Link to the Computer Dictionary Online  ::  Disclaimer for Computer Dictionary Online

Computer Dictionary Online
Copyright © 2017