Skip to main content

Vector.any

anycondition

Group: Logical

Documentation

Checks whether a predicate holds for at least one element of self vector.

Arguments

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

Examples

Checking if any element of the vector is larger than 3.

      [1, 2, 3, 4, 5].any (..Greater than=3)

Checking if any element of the vector is even.

      [1, 2, 3, 4, 5].any (x-> x%2 == 0)