So I was thinking of:

user=> (def any? (comp boolean some))
#'user/any?
user=> (any? true? [false true false])
true
user=> (any? even? [1 2 3])
true
; touch "3"
user=> (any? #(.exists %) [(file "1") (file "2") (file "3")])
true

Some motivations

- my main one is Java interop where use of non booleans would be weird
- similarly it is nicer for APIs to return booleans than a value that is 
kinda arbitrary and potentially non deterministic. I might recall Rich 
saying something like that..?
- the symmetry of `any` joining `not-any`, `every` and `not-every`.

On Sunday, April 26, 2015 at 2:21:26 PM UTC+12, Alex Miller wrote:
>
> I think 'some' fills this role. Given truthy values, why do you need to 
> use boolean with it?
>
> On Saturday, April 25, 2015 at 8:32:09 PM UTC-5, Colin Taylor wrote:
>>
>> Any reason why we don't have `any?`. Googled without much luck.
>> Trivially done as `comp boolean some` not doubt, but I know I use it more 
>> than not-any at least.
>> It's particularly useful as a composable `or`.
>>
>>
>>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to