[racket] call/cc not working as expected in DrScheme

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Aug 26 18:01:25 EDT 2010

On Aug 20, Bas Steunebrink wrote:
> 
> The funny thing is, I thought `(begin exp ...)' was nothing more
> than a syntactic abbreviation of `((lambda () exp ...))', but
> apparently there is an exception for the top level. Granted, this
> exception is described in R5RS, but I had failed to see the
> consequences of this on captured continuations!

Regardless of continuation, this is not true, and not only for the
toplevel --

  (define (foo x)
    (begin (define y (+ x 1))
           (define z (- y 1)))
    z)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.