In Python, there is a function all which returns true if all of its arguments are true, and any which returns true if at least one of its arguments is true. I find these quite useful in functional programming. Given how much Mathematica encourages functional programming constructs, I was surprised not to find anything equivalent to these all and any functions in the documentation. Does Mathematica have equivalents to these functions, or some standard way to achieve the same effect?
I can implement them myself as
AllOf[b_List] := Fold[And, True, b][[1]]
AllOf[b__] := Fold[And, True, {b}][[1]]
AnyOf[b_List] := Fold[Or, True, b][[1]]
AnyOf[b__] := Fold[Or, True, {b}][[1]]
(these may not be always correct, but they've worked for my purposes). But I would rather use something built-in if it exists.



AllOf[b_List] := And @@ bandAnyOf[b_List] := Or @@ b... – J. M.♦ Jan 29 '12 at 4:03MemberQandFreeQ. – amr Jan 1 at 8:37