Hello Jonathan,

For example, there are two functions that I'd like to be have: all()
and any(). That is, I want a function which checks a predicate against
a range and returns whether all elements in that range satisfy the
predicate, and I want a function that checks a predicate against a
range and returns whether any element satisfies the predicate.
Ideally, all() would shortcut if it found even one element which
didn't satisfy the predicate, and any() would shortcut if it found
even one that did.

The trivial solution (no shortcuting) would be to map the predicate and reduce via 'and' or 'or'.

--
... <IXOYE><



Reply via email to