Re: Easy update function for nested structures

2012-12-03 Thread JvJ
OK thanks. I guess that's sufficiently terse. I was just wondering if there was a single built-in function for it. On Monday, 3 December 2012 17:37:04 UTC-5, Las wrote: > > Hi, > > how about > > (reduce #(update-in % %2 tf) arr2d list-of-coordinates) > > given you 2d array is a vector of vector

Re: Easy update function for nested structures

2012-12-03 Thread László Török
Hi, how about (reduce #(update-in % %2 tf) arr2d list-of-coordinates) given you 2d array is a vector of vectors and you supply a tf update function? Las 2012/12/3 JvJ > I'm wondering if there's something that can be used like update-in, but > with multiple key-lists and values. > > Like, fo

Easy update function for nested structures

2012-12-03 Thread JvJ
I'm wondering if there's something that can be used like update-in, but with multiple key-lists and values. Like, for example, taking a list of [x y] coordinates for a 2-dimensional array, and changing the values at all of those coordinates. -- You received this message because you are subscri