private function aggregate($type, $cb = null)
    {
        $data = [];

        $this->recursive(
            $this->storage,
            function ($value) use (& $data) {
                if (is_numeric($value)) {
                    $data[] = $value;
                }
            }
        );

        $r = call_user_func_array($type, $data);

        if (is_callable($cb)) {
            call_user_func_array($cb, [$r]);
        }

        return $r;
    }