Re: assoc-in-by

2009-08-30 Thread John Harrop
On Sun, Aug 30, 2009 at 4:14 PM, kyle smith wrote: > > I wrote this based on assoc-in. If anyone thinks this should be in > core or contrib, feel free to use it. > > (defn assoc-in-by > "'Updates' a value in a nested associative structure, where ks is a > s

Re: assoc-in-by

2009-08-30 Thread kyle smith
haha, the api page strikes again! I figured something so basic would have to be included, but I obviously didn't see update-in. It would be nice to have a list of related functions that do not follow the standard nomenclature. Will the upcoming documentation push address this? --~--~-~-

Re: assoc-in-by

2009-08-30 Thread Meikel Brandmeyer
Hi, Am 30.08.2009 um 22:14 schrieb kyle smith: user> (assoc-in-by {:1 1 :2 {:3 3}} [:2 :3] inc) {:1 1, :2 {:3 4}} Doesn't this sound like update-in? 1:1 user=> (update-in {:a 1 :b {:c 3}} [:b :c] inc) {:a 1, :b {:c 4}} Sincerely Meikel smime.p7s Description: S/MIME cr

assoc-in-by

2009-08-30 Thread kyle smith
I wrote this based on assoc-in. If anyone thinks this should be in core or contrib, feel free to use it. (defn assoc-in-by "'Updates' a value in a nested associative structure, where ks is a sequence of keys and (f v) is the new value and returns a new nested structure. I