Widmogrod\Primitive\Listt::reduce PHP Method

reduce() public method

public reduce ( callable $function, $accumulator )
$function callable
    public function reduce(callable $function, $accumulator)
    {
        foreach ($this->value as $item) {
            $accumulator = call_user_func($function, $accumulator, $item);
        }
        return $accumulator;
    }