Pike v8.0 release 1738

Method Array.any()


Method any

bool any(array a, function(int(0..0), mixed ... :mixed) predicate, mixed ... extra_args)

Description

Returns 1 if any of the elements in a fulfills the requirement predicate( a[i], @extra_args ), otherwise 0. The predicate should return non-zero for an element that meets the requirements and zero for those that do not.

Example

Array.any( ({ 2, 4, 6, 8 }), `>, 5 )

See also

all, has_value