Re: assoc! order problem

2012-08-05 Thread llj098
thanks for reply, I know the sorted-map, but my question is : *why the map is not 'ordered' when size is larger than 32 ? * * * * * On Sunday, August 5, 2012 3:53:04 AM UTC+8, Jeff Heon wrote: > > You are using the map literal, which corresponds to the hash map. > > Use this if you want a sorted

assoc! order problem

2012-08-04 Thread llj098
Hi list, I'm learning Clojure now and I was confused by assoc!. Here is my code , I want to use the code to distinct items (I cannot use 'distinct' function here for some reasons.) (defn fn2[x] (vals (persistent! (reduce (fn [ret l] (assoc! ret l l )) (transient {}) x user=>