public function reduce(callable $callback, $initial = null)
    {
        foreach ($this->generator as $key => $value) {
            $initial = $callback($initial, $value, $key);
        }

        return $initial;
    }