Skip to main content

List.all

allcondition

Group: Logical

Documentation

Checks whether a condition holds for all elements in this list.

Arguments

  • condition: A Filter_Condition or a predicate function to test each element.

Examples

Check if all elements in the list are greater than zero.

      import Standard.Examples

example_all = Examples.list.all (..Greater than=0)

Check if all elements in the list are even.

      import Standard.Examples

example_all = Examples.list.all (x-> x%2 == 0)