[racket] Making namespaces meet
Hi,
I'm having trouble of getting namespaces meet when making dynamic
definitions. I made a simple example below.
((lambda ()
(define x 10)
(eval (list 'define 'y 5))
(+ x y)))
;>> reference to undefined identifier: y
I then tried to "store" one of the namespaces and pass it on to another, but
I guess that's not the way the namespaces work.
((lambda ()
(define namespace (current-namespace))
(define x 10)
(eval (list 'define 'y 5) namespace)
(+ x y)))
;>> reference to undefined identifier: y
Any ideas how to solve this?
br, jukka
| J U K K A T U O M I N E N
| m a n a g i n g d i r e c t o r M. A.
|
| Finndesign Kauppiaankatu 13, FI-00160 Helsinki, Finland
| mobile +358 50 5666290
| jukka.tuominen at finndesign.fi www.finndesign.fi