Ds\Map::reduce
Ds\Map::reduce
(PECL ds >= 1.0.0)
Ds\Map::reduce — Reduces the map to a single value using a callback function.
Description
public mixed Ds\Map::reduce ( callable $callback [, mixed $initial ] )
Reduces the map to a single value using a callback function.
Parameters
-
callback
-
mixed callback ( mixed $carry , mixed $key , mixed $value )
-
carry
-