Widmogrod\Monad\IO::reduce PHP 메소드

reduce() 공개 메소드

public reduce ( callable $function, $accumulator )
$function callable
    public function reduce(callable $function, $accumulator)
    {
        return static::of(function () use($function, $accumulator) {
            return call_user_func($function, $accumulator, $this->run());
        });
    }