Skip to main content

Pair.all

allpredicate

Group: Logical

Documentation

Checks whether a predicate holds for all elements in this pair.

Arguments

  • predicate: A function that takes a list element and returns a boolean value that says whether that value satisfies the conditions of the function.

Examples

Check if all elements in the pair are less than zero.

      Pair.new -1 3 . all (< 0)