Hi all,

From what I understand about call/cc, when a saved continuation is invoked, the current continuation should be discarded. So I expected the following program to just print `stop?' once; however, it doesn't stop.


Welcome to DrScheme, version 4.2.4 [3m].
Language: Pretty Big; memory limit: 128 megabytes.
> (define stop
    (let ((k (call-with-current-continuation (lambda (k) k))))
      (lambda ()
        (display "stop?\n")
        (k k))))
> (begin (stop) (stop) 42)
stop?
stop?
42
>


So is this an error in my understanding of call/cc or in DrScheme?

Regards,
Bas

_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to