[plt-scheme] namespace-variable-value
On Fri, Apr 27, 2007 at 06:41:34PM +0200, jos koot wrote:
> (module lang mzscheme
> (printf "defining~n")
> (namespace-set-variable-value! 'f 1))
>
> (module test mzscheme
> (require lang) ; does the top level assignment (once only)
> (provide (all-defined))
> (define (test1) (namespace-variable-value 'f))) ; refers to the top level
>
> (require test) ;; prints defining
> (test1) ;; --> 1
> (require lang) ;; does nothing
I'm hoping to set module-level variables, not top-level. My understanding
of the docs leads me to believe that namespace-variable-value can use
mapping to return imported variable mappings.
Wayne