public function sum(?callable $callback = null)
    {
        if ($callback === null) {
            $callback = function ($value, $key) {
                return $value;
            };
        }

        return $this->reduce(function ($total, $value, $key) use ($callback) {
            return $total + $callback($value, $key);
        }, 0);
    }