(try (ns foo.bar) (defn hi [])) (resolve 'foo.bar/hi) ; => nil (do (ns foo.bar) (defn hi [])) (resolve 'foo.bar/hi) ; => #'foo.bar/hi