Stéphane, if you mail me your code and test case I'll run it in the Cog closure VM and see if it works there.
On Fri, Jan 30, 2009 at 9:02 AM, Stéphane Rollandin lecteur@zogotounga.netwrote:
hello list,
I realized yesterday that my scheme implementation in Squeak failed to evaluate properly the so-called "mondo bizarro" code:
(let ((y (call-with-current-continuation (lambda (c) c)))) (display 1) (call-with-current-continuation (lambda (c) (y c))) (display 2) (call-with-current-continuation (lambda (c) (y c))) (display 3)))
... which should display "11213"
instead, it writes "11" then goes on forever printing "2"
I wrote the equivalent code in Smalltalk:
y _ Continuation currentDo: [:c | c]. Transcript show: 1. Continuation currentDo: [:c | y value: c]. Transcript show: 2. Continuation currentDo: [:c | y value: c]. Transcript show: 3.
and it appears the (wrong) behavior is the same.
is anyone expert enough in continuations to help me fix this ?
(the Continuation class used here is from Seaside)
Stef