On Feb 13, 12:10 am, Conrad <drc...@gmail.com> wrote: > Hi, is there a standard way to tell if a variable is bound? I couldn't > find a way.
There's an isBound method on the Var class: (.isBound #'foo) But the var has still got to exist, i.e. you have to (declare foo) first. If you want to check a var _exists_, then find-var can check whether a var exists in a namespace: (find-var 'user/foo) If you want to check your namespace, and all referred namespaces, I believe you can do: ((ns-map *ns*) 'foo) - James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---