Also, why does this work: user=> (assoc [:a :b :c :d] 2 :q) [:a :b :q :d]
And this doesn't: user=> (dissoc [:a :b :c :d] 2) #<CompilerException java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.IPersistentMap (NO_SOURCE_FILE:286)> Annoying. On Apr 27, 1:24 pm, Sean Devlin <francoisdev...@gmail.com> wrote: > Is there a built in to insert a value into an "indexed" seq? > > For example: > > user=> (insert [:a :b :c :d] 2 :q) > (:a :b :q :c :d) > > Not sure if I'm missing something simple... > Sean > > -- > 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 > athttp://groups.google.com/group/clojure?hl=en -- 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