On Feb 26, 2009, at 12:26, Konrad Hinsen wrote:
> At the moment I am using the following function, which does a syntax-
> quote for a single symbol:
>
> (defn symbol-in-current-ns
> [s]
> (symbol (str *ns*) (str s)))
Of course that should better be
(defn qualified-symbol
[s]
(let [s-str (str s)]
(if (.contains s-str "/")
s
(symbol (str *ns*) s-str))))
so that it doesn't mess up already qualified symbols.
Konrad.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---