[plt-scheme] namespaces and environments

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Sat Jun 25 16:27:42 EDT 2005

I'm guessing the answer is no, but I figure this is worth a shot:

I've found a procedure called "namespace-defined?".  It checks if a
symbol is defined.  like:

> (namespace-defined? 'bubbas-taco-hut)
> (define bubbas-taco-hut #t)
> (namespace-defined? 'bubbas-taco-hut)

now, I was wondering if there's somthing that would let you pull from
the current environment, so i could do:

> (let ((x 4))
    (namespace-defined? 'x))

and get #t.  (it currently returns #f, cause i think it only checks
the top level environment)


Posted on the users mailing list.