|
Ds\Set::reduceReduces the set to a single value using a callback function 説明
public mixed Ds\Set::reduce(callable
$callback, mixed $initial = ?)Reduces the set to a single value using a callback function. パラメータ
戻り値The return value of the final callback. 例例1 Ds\Set::reduce with initial value example 上の例の出力は、 たとえば以下のようになります。 int(30) 例2 Ds\Set::reduce without an initial value example 上の例の出力は、 たとえば以下のようになります。 int(21) |