Skip to content

Instantly share code, notes, and snippets.

@fogus
Created September 3, 2010 18:52
Show Gist options
  • Save fogus/564359 to your computer and use it in GitHub Desktop.
Save fogus/564359 to your computer and use it in GitHub Desktop.
(defn symbol
"Returns a Symbol with the given namespace and name."
{:tag clojure.lang.Symbol
:added "1.0"
:changed "1.3"
:static true}
([sym] (if (symbol? sym) name (clojure.lang.Symbol/intern sym)))
([ns sym] (clojure.lang.Symbol/intern (name ns) (name sym))))
@fogus
Copy link
Author

fogus commented Sep 3, 2010

Maybe (symbol (name 'a) (name 'b)) is a better approach after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment