On Jun 27, 2007, at 10:32 AM, Bradley Lucier wrote:
Marc:
Is there some combination of continuation-capture and continuation- graft that gives the semantics of call/ec?
Yes, since call/cc is built on top of the continution-XXX primitives and the following is a valid definition of call/ec:
(define call/ec call/cc)
The thing is that this implementation does not take advantage of the usage constraints of call/ec . It would be possible to implement call/ec in such a way that it does minimal heap allocation.
To be honest, I don't understand what any of call/ec, continuation- capture, and continuation-graft do.
Check out my paper "A Better API for First-Class Continuations" (http://repository.readscheme.org/ftp/papers/sw2001/ feeley.ps.gz) for the continuation-XXX operations.
Marc