I am pretty sure there is a common idiom, but I couldn\'t find it with Google Search...
Here is what I want to do (in Java):
Do you mean something like:
allTrue = all(somePredicate(elem) for elem in someIterable) anyTrue = any(somePredicate(elem) for elem in someIterable)