From: Stephane
Subject: A problem with continuation
Date: 
Message-ID: <34FBFF01.167EB0E7@kelenn-gw.univ-brest.fr>
Hello,

Can someone explain me why the following program (written in scheme)
give me the result: 11213.
I don't know exactly what the function call-with-current-continuation
do...
Thanks,

Stephane


(define program (lambda ()
  (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))))