Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Hussein B.
Crystal clear, thanks. On Friday, August 10, 2012 10:16:19 PM UTC+3, Andy Fingerhut wrote: > > Hussein: > > If you ignore the ref for the moment, making any "change" to a map, or a > map nested inside a map however many levels deep you wish, does not mutate > the original map. Instead it creat

Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Andy Fingerhut
Hussein: If you ignore the ref for the moment, making any "change" to a map, or a map nested inside a map however many levels deep you wish, does not mutate the original map. Instead it creates a brand new map with the new set of keys and values. It is as if the original was copied, and the c

Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Pierre-Henry Perret
If you want to stay with atomic transactions this is a Clojure feature , STM, if my souvenirs sont bons Le vendredi 10 août 2012 18:21:12 UTC+2, Hussein B. a écrit : > > Hi, > I have a ref type that wraps a map, this map is going to embed many nested > other maps. > According to immutability rul

Re: Immutability rules when it comes to Ref type

2012-08-10 Thread Pierre-Henry Perret
Would answer, if you want to be atomic, means transactional memory, that is a feature of Clore . Le vendredi 10 août 2012 18:21:12 UTC+2, Hussein B. a écrit : > > Hi, > I have a ref type that wraps a map, this map is going to embed many nested > other maps. > According to immutability rules, wha

Immutability rules when it comes to Ref type

2012-08-10 Thread Hussein B.
Hi, I have a ref type that wraps a map, this map is going to embed many nested other maps. According to immutability rules, what happens when: A new nested map is updated (entry is removed or update) or even a new nested map is added to the master map that is wrapped by ref type? Thanks for help