Hi
On 19.04.24 23:29, Tim Düsterhus wrote:> Thinking about this: I believe
that it would make sense to bundle
array_any and array_every (or array_all, see below) within the same RFC
due to the similarity. It can be a separate vote for those two, but
having the option of getting all three would probably alleviate my
concerns of adding new array functions piecemeal.
The implementation should be trivial, because it effectively just
changes the return type. Nevertheless I'm happy to assist should any
issues arise.
As for the naming:
JavaScript: every + some
Haskell : all + any
Rust : all + any
C++ : all_of + any_of + none_of
Java : allMatch + anyMatch (in java.util.stream.Stream)
Swift : allSatisfy + contains(where: …)
It appears the commonly used choice is all + any.
Thanks for your suggestion! I have added the `array_any` and `array_all`
functions to the RFC accordingly.
Cheers
Josh