Hello,
I was surprised to see that Clojure doesn't have an any? function. I
saw every?, not-every? and not-any? but no any?. Is there a reason
for this?
I wrote my own version, can anyone comment on it?
(defn any? [pred coll]
(loop [xs coll]
(if (nil? xs)
false
(if (pred (first xs))
true
(recur (rest xs))))))
Vincent.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---