Problem is, when your proposed dissoc removes value from a vector, it shifts all larger keys. So dissoc would not only remove value at index position, but also change keys for pther values. And this is not what dissoc should do
user=> (map-indexed vector [:a :b :c :d]) ([0 :a] [1 :b] [2 :c] [3 :d]) user=> (dissoc [:a :b :c :d] 1) ;; your proposal [:a :c :d] user=> (map-indexed vector [:a :c :d]) ([0 :a] [1 :c] [2 :d]) JW On Saturday, November 2, 2013 8:40:37 PM UTC+1, vra...@gmail.com wrote: > > > > On Saturday, November 2, 2013 2:38:57 PM UTC-5, vra...@gmail.com wrote: >> >> (assoc some-vector 2 'x) >> ;=> [a b x d e] >> (dissoc some-vector 3) ;; proposed >> ;=> [a b d e] >> > > Typo: > > (assoc some-vector 2 'x) > ;=> [a b x d e] > (dissoc some-vector 2) ;; proposed > ;=> [a b d e] > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.