On Sun, Apr 24, 2011 at 11:02 AM, Andre van Tonder <[email protected]> wrote:
> What does the following program print?  In other words, what does IMPORT do
> when redefining existing bindings?
>
> (module (foo)
>  (export (x)
>  (begin
>    (define x 1)))
>
> TOPLEVEL:
>
> (define x 0)
> (define (get-x) x)
> (import (foo))
> (display x)              ==> 1
> (display (get-x))        ==> WHICH WILL IT BE?

This is unspecified, and should probably be
an error in a program, but in the repl I think
implementations vary too greatly to standardize
this.

-- 
Alex

_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to