[plt-scheme] call/cc behavior in gambit-c vs. plt-scheme

From: Cristian Baboi (cristi at ot.onrc.ro)
Date: Wed Jun 11 05:02:09 EDT 2008

Hello!

Trying to learn scheme, I've made this small test file and tried it in  
gambit-c and plt-scheme.

(define (call/ccc x) (call-with-current-continuation x))

(define coco 1)

(begin
  (display "begin") (newline)
  (call/ccc (lambda (c) (set! coco c)))
  (display "again") (newline)
  (display "end") (newline)
)

(coco 13)

The result was:
- plt-scheme printed:
   begin
   again
   end
   13


- gambit-c printed:
   begin
   again
   end
   again
   end
   again
   end
   ...


My question: which one is the intended behavior ?

Thank you!


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Servers.
  part000.txt - is OK
http://www.eset.com


Posted on the users mailing list.