[plt-scheme] bug with callcc?

From: John Clements (clements at brinckerhoff.org)
Date: 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://lists.racket-lang.org/users/archive/attachments/20081208/c510828a/attachment.p7s>

Posted on the users mailing list.