View Problem

Test if a condition holds for all items of a list

Given a list, test if a certain logical condition (i.e. predicate) holds for all items of the list.
DiskEdit
python 2.6
all(x > 1 for x in [2,3,4])
DiskEdit
erlang
Result = lists:all(Pred, List).
ExpandDiskEdit
fantom
echo([2,3,4].all{ it>1 })
DiskEdit
groovy
[2,3,4].every{it > 1}

Submit a new solution for python, csharp, erlang, fantom ...
There are 8 other solutions in additional languages (clojure, cpp, fsharp, haskell ...)