Skip to main content
Returns whether no elements of an array match the given predicate.
  • Returns true (1) if none of the elements matches the predicate (a special case is when the array is empty).
  • Returns false (0) if one or more elements match the predicate.
  • Returns NULL if the predicate returns NULL for one or more elements and false for all other elements.

Syntax

Returns whether no elements of arr1 match the given predicate in the lambda function.

Parameters

  • arr1: the array to match.
  • arrN: optional arrays used in the lambda function.
  • lambda_function: the lambda function used to match values.

Return value

Returns a BOOLEAN value.

Usage notes

  • The lambda function follows the usage notes in array_map().
  • If the input array is null or the lambda function results in null, null is returned.
  • If arr1 is empty, true is returned.
  • none_match() is the negation of any_match(): none_match(f, arr) returns the same result as NOT any_match(f, arr).
  • To apply this function to MAP, rewrite none_match((k,v)->k>v,map) to none_match(map_values(transform_values((k,v)->k>v, map))). For example, select none_match(map_values(transform_values((k,v)->k>v, map{2:1}))); returns 0.

Examples

Check whether no element in x is less than the elements in y.