On Jul 5, 1:20 pm, Adrian Cuthbertson <adrian.cuthbert...@gmail.com> wrote: > (dosync (alter rms assoc-in [:key1 :key2 :key3] "foo")) > {:key1 {:key2 {:key3 "foo"}}}
I just found update-in, which is even better, as I want to update a set: user=> (def gnu-rms (ref {:key1 {:key2 {:key3 #{}}}})) #'user/gnu-rms user=> (dosync (alter gnu-rms update-in [:key1 :key2 :key3] #(conj % "foo"))) {:key1 {:key2 {:key3 #{"foo"}}}} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---