Re: mset

2009-01-05 Thread Timothy Pratley
On Jan 6, 11:21 am, Stuart Sierra wrote: > You might be able to simplify this by having just one Ref containing > the global "state" of the game. Hi Stuart, yes I agree that is the better approach. I went down the 'multi-mutable' path trying to improve relationship handling. Consider two rooms

Re: mset

2009-01-05 Thread Stuart Sierra
I've developed a > helper which can update in place any mutable map, handles nested > access, and behaves like assoc on immutables. > > It allows usage like so: > ; set up a mutable map of mutable players - tongue twister > (def players (ref nil)) > (mset players "tim&quo

mset

2009-01-04 Thread Timothy Pratley
e map of mutable players - tongue twister (def players (ref nil)) (mset players "tim" (ref {:str 5 :con 5})) (mset players "tom" (ref {:str 7 :con 2})) ; change some attributes (mset players "tim" :str 6) (mset players "tim" :con 4) (mset players "tim&qu