Returns a function which tests if every element in an array passes a test condition.
true
; otherwise, the function should return false
.true
if all elements pass the test and false
otherwise.false
if provided an empty array.false
is not provided an array.function to apply
an array function
var isOdd = require( `@stdlib/assert/is-odd` );
var arr1 = [ 1, 3, 5, 7 ];
var arr2 = [ 3, 5, 8 ];
var validate = arrayfcn( isOdd );
var bool = validate( arr1 );
// returns true
bool = validate( arr2 );
// returns false
Predicate function.
array element
test result