src/Collection/ImmArray.php
public function reduce(callable $cb, $initial = null)
    {
        foreach ($this->sfa as $i => $el) {
            $initial = $cb($initial, $el, $i, $this);
        }
        return $initial;
    }
public function reduce(callable $cb, $initial = null)
    {
        foreach ($this->sfa as $i => $el) {
            $initial = $cb($initial, $el, $i, $this);
        }
        return $initial;
    }
public function reduce ( callable $ cb , $ initial = null ) { foreach ( $ this -> sfa as $ i => $ el ) { $ initial = $ cb ( $ initial , $ el , $ i , $ this ) ; } return $ initial ; }
Reduce to a single value

@param callable $cb Callback(
mixed $previous, mixed $current[, mixed $index, mixed $immArray]
):mixed Callback to run reducing function
@param mixed $initial Initial value for first argument
Reduce to a single value