[plt-scheme] Exiting the current context

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Feb 4 08:11:23 EST 2009

Try abort-current-continuation

http://docs.plt-scheme.org/reference/cont.html#(def._((quote._~23~25kernel)._abort-current-continuation))

Jay

On Wed, Feb 4, 2009 at 6:04 AM, Vijay Mathew
<vijay.the.schemer at gmail.com> wrote:
> 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
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.