|
Ds\Set::reduceReduces the set to a single value using a callback function Description
public mixed Ds\Set::reduce(callable
$callback , mixed $initial = ?)Reduces the set to a single value using a callback function. Parameters
Return ValuesThe return value of the final callback. ExamplesExample #1 Ds\Set::reduce with initial value example
The above example will output something similar to: int(30) Example #2 Ds\Set::reduce without an initial value example
The above example will output something similar to: int(21) |