Re: Operations inside associative structures

2011-03-18 Thread Nick
Dude...that's awesome. I don't know how I completely missed that. I must have gotten lazy by the time I got to the end of the API page. On Mar 18, 8:12 pm, Ken Wesson wrote: > On Fri, Mar 18, 2011 at 9:04 PM, Nick wrote: > > I'm looking to do some operations upon the data in an associative > >

Re: Operations inside associative structures

2011-03-18 Thread Ken Wesson
On Fri, Mar 18, 2011 at 9:04 PM, Nick wrote: > I'm looking to do some operations upon the data in an associative > structure.  What do you think about this method of hijacking the > definition of assoc-in?  Is there some better way to do what I'm doing > here? > > user> (defn op-in [op m [k & ks]

Operations inside associative structures

2011-03-18 Thread Nick
I'm looking to do some operations upon the data in an associative structure. What do you think about this method of hijacking the definition of assoc-in? Is there some better way to do what I'm doing here? user> (defn op-in [op m [k & ks] v] (if ks (assoc m k (op-in o