[racket] begin vs +

From: Jos Koot (jos.koot at telefonica.net)
Date: Mon Aug 2 09:58:50 EDT 2010

Because all the time 9 is added to 2 yielding 11.
Jos 

> -----Original Message-----
> From: users-bounces at racket-lang.org 
> [mailto:users-bounces at racket-lang.org] On Behalf Of Keiko Nakata
> Sent: 02 August 2010 14:55
> To: mflatt at cs.utah.edu
> Cc: users at racket-lang.org
> Subject: Re: [racket] begin vs +
> 
> Actually, I didn't see.
> 
> Why this code 
> 
> (let ([d (box #f)] [a (box 0)])
>   (print (+ (begin (let/cc k (begin (set-box! d k) (set-box! 
> a 2) 3))) (unbox a)))
>   ((unbox d) 9))
> 
> prints 511111111, rather than 59999999?
> 
> Keiko
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users




Posted on the users mailing list.