chickadee » continuations » escape-procedure


captures and returns the current continuation as an escape procedure. Typically used as follows

(let ((cc (escape-procedure)))
    ((escape-procedure? cc)
     ;; normal body
     ;; possibly calling (cc val) ...
    ((ok? cc)
     ;; exceptional case
     ;; do something with cc ...))

Note, that the let is invoked twice, first after the call to escape-procedure, then with the object val, which was bound to cc by calling (cc val).