Ds\Vector::reduce

Ds\Vector::reduce

(PECL ds >= 1.0.0)

Ds\Vector::reduceReduces the vector to a single value using a callback function.

Description

public mixed Ds\Vector::reduce ( callable $callback [, mixed $initial ] )

Reduces the vector to a single value using a callback function.

Parameters

callback
mixed callback ( mixed $carry , mixed $value )
carry

登录查看完整内容