value >= threshold as a reusable predicate.
Creates a predicate Closure that is true when the passed number is greater than or equal to the bound number.
/**
* @param int|float $a
* @return Closure(int|float):bool
*/
Comparisons\isGreaterThanOrEqualTo($a): ClosureWhen Comparisons\isGreaterThanOrEqualTo() is called, it returns the following Closure which can be used like a regular function.
/**
* @param int|float $b
* @return bool
*/
$function ($b): boolThis can be used to create a simple closure which can be used as a regular function.
$adult = Comparisons\isGreaterThanOrEqualTo(18);
var_dump($adult(18)); // true
var_dump($adult(17)); // false
$adults = array_filter([15, 18, 21], $adult);
print_r($adults); // [18, 21]