[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: manipulating continuations
From: |
Keith Wright |
Subject: |
Re: manipulating continuations |
Date: |
Sat, 12 Feb 2011 11:40:07 -0500 |
> From: Andy Wingo <address@hidden>
> Cc: address@hidden
>
> Hi Thomas,
>
> In this expression, `foo' has returned twice. The first time it
> returned a continuation, which was applied. The second time it returned
> whatever `newline' returned: the unspecified value. Applying the
> unspecified value failed.
This first part is good.
It explains that you have evaluated ((newline))
on the second call.
> If you use Guile 1.9/2.0, partial continuations behave more in the way
> you were thinking of:
>
> (use-modules (ice-9 control))
>
> (define (foo)
> (% (begin
> (display "first part\n")
> (abort)
> (display "second part\n"))
> (lambda (cont)
> ;; abort jumps back here, to the handler. return the partial
> ;; continuation.
> cont)))
This is not Scheme and should be ignored by anyone
who is new to Scheme. I have been using Scheme,
off and on, for decades but I can't read this program.
What is (% ...)? What is a "partial continuation"?
Has Guile gone off into left field, never to return?
Can we continue from R5RS or R6RS?
-- Keith