Hi, is there a standard way to tell if a variable is bound? I couldn't
find a way.
Basically I want something like this, but without the horrible hacks:

(defn bound? [var]
    (try (eval var)
           true
           (catch java.lang.Exception x false)))

> (bound? 'foo)
false
> (def foo 33)
33
> (bound? 'foo)
true


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to