Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
[[tags: manual]] [[toc:]] == 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 [[http://www.iro.umontreal.ca/~feeley/papers/FeeleySW01.pdf|A Better API for First-Class Continuations]] by Marc Feeley. === Continuations API ==== continuation-capture <procedure>(continuation-capture PROCEDURE)</procedure> Creates a continuation object representing the current continuation and tail-calls {{PROCEDURE}} with this continuation as the single argument. ==== continuation? <procedure>(continuation? X)</procedure> 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 <procedure>(continuation-graft CONT THUNK)</procedure> Calls the procedure {{THUNK}} with no arguments and the implicit continuation {{CONT}}. ==== continuation-return <procedure>(continuation-return CONT VALUE ...)</procedure> Returns the value(s) to the continuation {{CONT}}. {{continuation-return}} could be implemented like this: <enscript highlight=scheme> (define (continuation-return k . vals) (continuation-graft k (lambda () (apply values vals)))) </enscript> ---- Previous: [[Module (chicken condition)]] Next: [[Module (chicken csi)]]
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 24 from 1?