[plt-scheme] Continuations and (begin)

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Sat Feb 7 11:37:22 EST 2009

> Just out of curiosity, is there a function that simply returns the
> current continuation without jumping to another function using
> (call/cc)?

Do you mean something like this?

(define (gimme-cc)
  (let/cc k
    (call/cc k2
      (k k2))))

Otherwise we'll have to start getting all zen on yo' ass: "the
continuation you return is no longer the current continuation,
grasshopper", etc.


Posted on the users mailing list.