<br><br><div class="gmail_quote">On Mon, Aug 2, 2010 at 15:23, Keiko Nakata <span dir="ltr"><<a href="mailto:keiko@kurims.kyoto-u.ac.jp">keiko@kurims.kyoto-u.ac.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<div class="im"><br>
From: Matthew Flatt <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>><br>
<br>
</div><div class="im">> At Mon, 02 Aug 2010 21:54:54 +0900 (JST), Keiko Nakata wrote:<br>
</div><div class="im">> > Why this code<br>
> ><br>
> > (let ([d (box #f)] [a (box 0)])<br>
> > (print (+ (begin (let/cc k (begin (set-box! d k) (set-box! a 2) 3))) (unbox<br>
> > a)))<br>
> > ((unbox d) 9))<br>
> ><br>
> > prints 511111111, rather than 59999999?<br>
><br>
> I'm not sure I'm following. Can you say more about why you expect<br>
> infinite "9"s instead of infinite "11"s?<br>
<br>
</div>I wanted to undo the assignment (set-box! d k), but I think I am confusing.<br>
I'm a novice to continuations...<br>
<br>
I used begin to enforce sequentiality, but seemed to be trapped by it.<br></blockquote><div><br>Maybe you could use `(let () <i>body ...</i>)' instead? It should be closer to your intentions.<br></div></div>