On 14 Mrz., 16:26, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: > I've added a "seek" function to clojure.contrib.seq-utils: > > (defn seek > "Returns the first item of coll for which (pred item) returns > logical true. > Consumes sequences up to the first match, will consume the entire > sequence > and return nil if no match is found." > [pred coll] > (first (filter pred coll)))
Thanks Stuart. Btw, what do you think about Craigs idea, about overloading first? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---