[plt-scheme] bug with callcc?

John Clements clements at brinckerhoff.org
Mon Dec 8 15:07:09 EST 2008


On Dec 8, 2008, at 11:53 AM, Wolfgang De Meuter wrote:

> Hello,
>
> I think the following code should produce an infinite loop.
>
> (begin
>  (define k '())
>  (* 5 (call-with-current-continuation
>          (lambda (cont)
>            (set! k cont)
>            2)))
>  (k 3))
>
> In R6RS is does, but in PrettyBig it produces 15. A bug?

I believe that the top-level in Pretty Big (in whatever version you're  
using) wraps a prompt around top-level expressions, and that a begin  
at top level is treated as two separate top-level expressions.

John Clements


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20081208/c510828a/smime.bin


More information about the plt-scheme mailing list