> From: Andy Wingo <[email protected]>
> Cc: [email protected]
> 
> 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

Reply via email to