Re[2]: [Haskell-cafe] I just don't get it (data structures and OO)

2007-06-03 Thread Bulat Ziganshin
Hello Phlex, Sunday, June 3, 2007, 11:41:29 AM, you wrote: That's precisely the thing i don't understand. In order to update node 3 with a new pointer, i need to mutate it, so i need to recreate it, and so on up to node 1. yes, that's true Now in this exemple, it's ok since that's a regular

Re[2]: [Haskell-cafe] I just don't get it (data structures and OO)

2007-06-03 Thread Bulat Ziganshin
Hello Phlex, Sunday, June 3, 2007, 12:34:26 PM, you wrote: So i need to do something like this : changePlanetAge universe galaxy planet age = ...lots of code, returning a new universe And the same code for all functions updating any of the properties of my planet ... And the same code for

Re[2]: [Haskell-cafe] I just don't get it (data structures and OO)

2007-06-03 Thread Bulat Ziganshin
Hello Malcolm, Sunday, June 3, 2007, 1:13:06 PM, you wrote: The thing is, now that i have my planet p... i want to change it's age ... and get back the new state of the universe... There has been lots of research into easing the pain of creating this outer traversal code - search for Scrap