scheme,racket,continuations,delimited-continuations

What is a prompt, conceptually? Scheme in general has the idea of continuations, but Racket extends this with the idea of delimited continuations. The idea of a continuation is that it captures the remaining computation left to be evaluated. I will not attempt to explain continuations in general, since that...

scheme,coroutine,continuations,guile,delimited-continuations

Something like this: (define (make-generator procedure) (define last-return #f) (define last-value #f) (define last-continuation (lambda (_) (procedure yield))) (define (yield value) (call/cc (lambda (continuation) (set! last-continuation continuation) (set! last-value value) (last-return value)))) (lambda args (call/cc (lambda (return) (set! last-return return) (if (null? args) (last-continuation last-value) (apply last-continuation args)))))) Used like...