Stéphane,<div><br></div><div>&nbsp;&nbsp; &nbsp;if you mail me your code and test case I&#39;ll run it in the Cog closure VM and see if it works there.<br><br><div class="gmail_quote">On Fri, Jan 30, 2009 at 9:02 AM, Stéphane Rollandin <span dir="ltr">&lt;<a href="mailto:lecteur@zogotounga.net">lecteur@zogotounga.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">hello list,<br>
<br>
I realized yesterday that my scheme implementation in Squeak failed to evaluate properly the so-called &quot;mondo bizarro&quot; code:<br>
<br>
(let ((y (call-with-current-continuation (lambda (c) c))))<br>
 &nbsp; &nbsp;(display 1)<br>
 &nbsp; &nbsp;(call-with-current-continuation (lambda (c) (y c)))<br>
 &nbsp; &nbsp;(display 2)<br>
 &nbsp; &nbsp;(call-with-current-continuation (lambda (c) (y c)))<br>
 &nbsp; &nbsp;(display 3)))<br>
<br>
... which should display &quot;11213&quot;<br>
<br>
instead, it writes &quot;11&quot; then goes on forever printing &quot;2&quot;<br>
<br>
I wrote the equivalent code in Smalltalk:<br>
<br>
y _ Continuation currentDo: [:c | c].<br>
Transcript show: 1.<br>
Continuation currentDo: [:c | y value: c].<br>
Transcript show: 2.<br>
Continuation currentDo: [:c | y value: c].<br>
Transcript show: 3.<br>
<br>
and it appears the (wrong) behavior is the same.<br>
<br>
is anyone expert enough in continuations to help me fix this ?<br>
<br>
(the Continuation class used here is from Seaside)<br>
<br>
<br>
Stef<br>
<br>
<br>
<br>
</blockquote></div><br></div>