(assoc-in [:a [:b [:c :d] :e]] [1 1 1] :f);=> [:a [:b [:c :f] :e]]
(assoc-in [] [0] :a);=> [:a](assoc-in [] [1] :a);IndexOutOfBoundsException clojure.lang.PersistentVector.assocN (PersistentVector.java:183)(assoc-in [] [0 0] :a);=> [{0 :a}](assoc-in [] [0 0 0] :a);=> [{0 {0 :a}}](assoc-in [] [0 0 1] :a);=> [{0 {1 :a}}]Dunno if this is the correct place and way to suggest a correction:
Someone just mentioned to me that (assoc-in) seems to only work for maps, as the Cheat Sheet section on vectors doesn't mention it. I was able to show him otherwise, but maybe this is something the CS should pick up?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/ScfNTwBtS9A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.