[plt-scheme] Exiting the current context
Hi all,
I am not sure if the term "current context" is what it should be. Anyway,
here is what I like to accomplish:
(define (suspend func)
(call/cc
(lambda (k)
(save-k)
(func)
(exit-current-context))))
(define (run)
(suspend my-func) ;; (run) should return here, as a result of
(exit-current-context)
;; When continuation saved by (suspend) is invoked, (run) should resume
at (do-something).
(do-something))
How can I implement (exit-current-context)??
Thanks in advance,
-- Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090204/d6d7df4b/attachment.html>