Changeset 32683 in project


Ignore:
Timestamp:
08/09/15 11:38:01 (5 years ago)
Author:
juergen
Message:

docu of continuations 1.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/continuations

    r30140 r32683  
    2626
    2727Moreover, another interface to continuations is provided, recommended by
    28 Matt Might, albeit with different names: continuation and the infamous
    29 goto. The former is sort of a constructor, the latter, although
    30 dangerous, is sometimes useful, e.g. in backtracking ....
     28Matt Might, albeit with different names: current and the infamous
     29goto. The former makes possible code written in an idiom similar to the
     30setjmp-longjmp-pair in C, the latter, although dangerous, is sometimes
     31useful, e.g. in backtracking ....
    3132 
    3233The second module, continuations-used, provides some applications of the
     
    4546<procedure>(continuation)</procedure>
    4647
     48deprecated, use current instead.
     49
     50==== current
     51
     52<procedure>(current)</procedure>
     53
    4754captures and returns the current continuation. Typically used as follows
    4855
    4956<enscript highlight=scheme>
    50 (let ((cc (continuation)))
     57(let ((cc (current)))
    5158  (if (continuation? cc)
    5259    ... (throw cc val) ...
     
    112119
    113120The infamous goto, but with a continuation as argument instead of a label.
     121
     122==== call
     123
     124<procedure>(call receiver)</procedure>
     125
     126The same as call/cc, but implemented via capture.
    114127
    115128=== The routines of the continuations-used module
     
    220233== Last update
    221234
    222 Nov 27, 2013
     235Aug 09. 2015
    223236
    224237== Author
     
    259272== Version History
    260273
     274; 1.3 : continuation renamed current, call added
    261275; 1.2.4 : tests updated
    262276; 1.2.2 : tests updated
Note: See TracChangeset for help on using the changeset viewer.