On Wed, Feb 18, 2009 at 12:30 PM, Telman Yusupov <use...@yusupov.com> wrote: > > I'm not sure which version is more idiomatic, but the last one seems > to give me the best performance out of all versions.
No prettier, but a bit faster: (defn remove-at42 [coll & indexes] (let [iset (set indexes)] (loop [i (int 0) sq (seq coll) v []] (if-not sq v (recur (inc i) (next sq) (if (iset i) v (conj v (first sq)))))))) --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---