On Friday, 11 May 2012 at 21:53:06 UTC, Jonathan M Davis wrote:
I know that haskell has such a function, and there were a
number of complaints
previously that we _didn't_ have an any function which does
exactly what
std.algorithm.any now does. It's a very functional approach to
use predicates
like that and I get the impression that it's common in other
functional
languages based on other's comments. The only one off the top
of my head that I
_know_ has such a function though is haskell.
Ruby has a function like that as well. It works like the Haskell
version if you pass a predicate. If you don't pass an argument it
works like the one in C#.
--
/Jacob Carlborg