>  (import (foo-library))   ; imports name "foo", possibly a syntax.
>  (define x (foo 42))
>  (define (foo n) (* n n))

I am only an egg, but I don't understand why this is a hard and/or
contentious question.  The (foo 42) is evaluated once, when the first
define is seen, and its value is bound to X.  (Yeah, yeah, don't tell me
about locatives.)

Did you mean (define (X) (foo 42))?
                     ---
Then there might be an interesting question about which foo will be used
when procedure X is invoked.  To which I say, the one that squares its
argument, as provided in the later define.  Once again (sorry for keeping
banging on this point), that is the only behavior consistent with the
last 50 years of REPLs, and the only behavior any Lisp-family language
will ever have.

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to