> On Wed, Sep 29, 2010 at 11:53 PM, Baishampayan Ghose <b.gh...@gmail.com> > wrote: >> (into {} (for [[k v] { :stuff 42 :like 13 :this 7 }] >> [(.toUpperCase (name k)) v])) > > (defn- to-struct [r] (into {} (for [[k v] r] [(.toUpperCase (name k)) v])) > > That is certainly nicer than most of my attempts, thank you! > > Any reason for .toUpperCase instead of clojure.string/upper-case?
clojure.contrib.string/upper-case is a trivial wrapper over .toUpperCase. In my humble opinion it's perfectly OK to use such static Java methods directly instead of writing trivial wrappers around them. This also helps in avoiding the contrib dependency. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- 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 Note that posts from new members are moderated - please be patient with your first post. 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