Hi,

Am 09.04.2009 um 15:49 schrieb Stephen C. Gilardi:

I like it for its simplicity. It can actually be a little simpler yet as the general case gives the same result when passed no arguments as the special case does:

(defn as-str
 [& args]
(apply str (map #(if (instance? clojure.lang.Named %) (name %) %) args)))

Please note that all implementation proposed so far
ignore the namespace of a Named.

(as-str :foo/bar)
(as-str :frob/bar)

will give the same string. This might be intended, but
it also might be the source of subtle bugs.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to