[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc
- To: oleg@x
- Subject: Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc
- From: Andy Wingo <wingo@x>
- Date: Sun, 19 Aug 2012 11:30:38 +0200
- Cc: scheme-reports@x
- In-reply-to: <firstname.lastname@example.org> (email@example.com's message of "22 Feb 2012 11:01:57 -0000")
- References: <firstname.lastname@example.org>
Apologies for reviving this very old thread, but I had a question.
On Wed 22 Feb 2012 12:01, oleg@x writes:
>Andy Wingo said:
>> [*] To implement a delimited call/cc on top of prompt and abort, you
>> would need an additional operator that captures a partial continuation,
>> but without unwinding the prompt.
> Not at all: see the definition of the `delimited' call/cc (called
> cwcc) in terms of shift in Scheme48 distribution:
> (which has been there since about 1994).
Here is the implementation:
(shift k (k (p (lambda (x)
(shift k1 (k x))))))))
However, unless I misunderstand, this definition will exercise any
dynamic-wind that is between the reset and the shift, unlike Scheme's
call/cc which will not invoke any dynamic-winds. That is the reason I
thought we would need a third operator.
Do you agree?
Scheme-reports mailing list