Skip to main content

List.any

anycondition

Group: Logical

Documentation

Checks whether any element of the list matches the given condition.

Arguments

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

Examples

Check if any element of the list is larger than 5.

      import Standard.Examples

example_any = Examples.list.any (..Greater than=5)

Check if any element of the list is even.

      import Standard.Examples

example_any = Examples.list.any (x-> x%2 == 0)