public function reduce($closure = 'add', $initializer = null)
    {
        if ($this instanceof \Iterator) {
            $closure = $closure instanceof \Closure ? $closure : Itertools\reductions\get_reduction($closure);
            $this->rewind();

            if (null === $initializer) {
                if ($this->valid()) {
                    $initializer = $this->current();
                    $this->next();
                }
            }

            $accumulatedValue = $initializer;
            while ($this->valid()) {
                $accumulatedValue = $closure($accumulatedValue, $this->current());
                $this->next();
            }

            return $accumulatedValue;
        }

        return null;
    }