Hi, (1) I'm sure there must be a simpler way to update the last element of a vector other than dec and count :
(let [xs [1 2 3]] (assoc xs (dec (count xs)) 4)) This gets messy when updating vectors in nested data structures : (update-in [1 [1 2 [1 2 3]]] [1 2] #(assoc % (dec (count %)) 5)) So, what am I doing wrong? P.S. I know I could reverse the order of the data in the lists (i.e. probably changing to lists rather than vectors for conj-ing purposes), but im interested in vectors specifically. Thanks Andy -- 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/d/optout.