[plt-scheme] difference between imported definition versus locally defined definitions?
Hi all -
What is the difference with respect to imported bindings and local
bindings? I notice that imported binding cannot be expanded via #%top?
> (define foo (lambda (x) x))
> foo
#<procedure:foo>
> (#%top . foo)
#<procedure:foo> ; => expected
> (module foo2 mzscheme
(define bar (lambda (x) x))
(provide bar))
> (require foo2)
> bar
#<procedure:bar>
> (#%top . bar)
. reference to undefined identifier: bar ; => unexpected...
In syntax a define often gets expanded to (#%top . id) form, so how can I
write
#'(define local-id imported-id)
Given that the above gets expanded to
#'(define-values (local-id) (#%top . imported-id))
?
Thanks,
yinso
--
http://www.yinsochen.com
...continuous learning...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070423/71cb7d39/attachment.html>