Check if all the values of the collection satisfies the function
- fn
- Function to check if the predicate is true.
- coll
- Collection of values to check all are true by the `$fn`.
Check if all the values are bigger than 10:
<?php
use function Lambdish\Phunctional\all;
return all(
function ($number) {
return $number > 10;
},
[9, 40, 30, 90, 50]
);
// false