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)))


-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to