Stream of boolean values, is any true?

Streams API actually has first-class support for your requirement:

setOfE.parallelStream().anyMatch(e -> eval(e));

As opposed to your approach with reduce, this is guaranteed to have short-circuit evaluation and optimally leverage parallelism.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)