On Apr 27, 11:22 am, Christophe Grand <[email protected]> wrote:
> find-first-result is already in core: some
As an aside, I would have liked (some pred coll) to return the item
that makes the pred true and the current implementation of `some to be
renamed `any? so that we would have the following:
(any? odd? [2 4 5 12]) ;; result is true
(every? odd? [3 5 6 13]) ;; result is false
(not-any? odd? [2 4 5 12]) ;; result is false
(not-every? odd? [3 5 6 13]) ;; result is true
(some odd? [2 4 5 12]) ;; result is 5
Mathematically, for the first four,
(Ex in [2 4 5 12])(x is odd)
(Ax in [3 5 6 13])(x is odd)
~(Ex in [2 4 5 12])(x is odd)
~(Ax in [3 5 6 13])(x is odd)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---