public function reduce($reducer, $initial = null, $finisher = null)
    {
        $reduced = $initial;
        $this->walk(function ($value, $key) use ($reducer, &$reduced) {
            $reduced = $this->call($reducer, $reduced, $value, $key);
        });

        if (null === $finisher) {
            return $reduced;
        } else {
            return $this->call($finisher, $reduced);
        }
    }