On Apr 25, 2013, at 15:41 , Joachim De Beule <[email protected]> wrote:

> I was searching for an "easy" way to combined nested maps, e.g. as in 
> 
> (combine {:foo {:bar "baz"}} {:foo {:x "y"}})
> => {:foo {:bar "baz", :x "y"}}

user=> (merge-with merge {:foo {:bar "baz"}} {:foo {:x "y"}})
{:foo {:x "y", :bar "baz"}}

If you need to support more than one level of nesting, you could try something 
like:

(defn combine [& maps]
    (apply merge-with combine maps))

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to