value < threshold as a reusable predicate.
Creates a predicate Closure that is true when the passed number is strictly less than the bound number.
/**
* @param int|float $a
* @return Closure(int|float):bool
*/
Comparisons\isLessThan($a): ClosureWhen Comparisons\isLessThan() 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.
$under100 = Comparisons\isLessThan(100);
var_dump($under100(99)); // true
var_dump($under100(100)); // false (strict)
$small = array_filter([50, 100, 150], $under100);
print_r($small); // [50]