That's exactly what I was looking for.
Thank you Brian.
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, se
I think you can just use the update-in function like:
1:1 user=> (def m {:a {:b {:c {:d 3)
#'user/m
1:2 user=> (update-in m [:a :b :c :d] - 5)
{:a {:b {:c {:d -2
On Sun, Jan 11, 2009 at 11:08 AM, CuppoJava wrote:
>
> Hi,
> I'm just wondering if there's a clever way of creating a new ma
Hi,
I'm just wondering if there's a clever way of creating a new map from
an existing map of map of maps.. with a key deep inside altered.
ie. given this map: {:a {:b {:c {:d 3
i want to create a new map, with the value at :d increased by 5.
I wrote a macro to do this, but it's quite ugly.