Is using subvec for something like this a bad idea? On Wed, Feb 18, 2009 at 12:38 AM, CuppoJava <patrickli_2...@hotmail.com>wrote:
> > Hi, > I'm wondering if there's a terser more idiomatic way to write the > following. I want to get a new vector with the specified indexes > removed. I found myself doing this often enough to warrant writing my > own function for this but I would be much happier if there's some > terse way of expressing this using the standard clojure functions. > > (defn remove_at [coll & indexes] > (map second > (remove #(some #{(first %)} indexes) (map vector (iterate inc > 0) coll)))) > > Thanks a lot > -Patrick > > > --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---