Hi, here's my try using for:
(defn xmlns-attr? [k] (or (= k :xmlns) (.startsWith (name k) "xmlns:"))) (defn ns-assoc-2 [attrs xmlns-map] (into xmlns-map (for [[k v] :when (xmlns-attr? k)] [(-> k name (.replaceAll "xmlns:" "") (.replaceAll "xmlns" "")) v]))) The second replace lokks a bit suspicious: if k is equal to :xmlns this will result in the key being the empty string. Is this intended? Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---