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