chickadee » chicken » continuation

Module (chicken continuation)

This module provides a more powerful interface for continuations than that provided by call/cc.

More information about this continuation API can be found in the paper A Better API for First-Class Continuations by Marc Feeley.

Continuations API


continuation-capture PROCEDUREprocedure

Creates a continuation object representing the current continuation and tail-calls PROCEDURE with this continuation as the single argument.


continuation? Xprocedure

Returns #t if X is a continuation object, or #f otherwise. Please note that this applies only to continuations created by the Continuation API, but not by call/cc, i.e.: (call-with-current-continuation continuation?) returns #f, whereas (continuation-capture continuation?) returns #t.


continuation-graft CONT THUNKprocedure

Calls the procedure THUNK with no arguments and the implicit continuation CONT.


continuation-return CONT VALUE ...procedure

Returns the value(s) to the continuation CONT. continuation-return could be implemented like this:

(define (continuation-return k . vals)
    (lambda () (apply values vals))))

Previous: Module (chicken condition)

Next: Module (chicken csi)

Contents »