Pike v8.1 release 6

Method Array.all()


Method all

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

Description

Returns 1 if all 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.all( ({ 2, 4, 6, 8 }), `<, 17 )

See also

any, has_value