in reply to Re: List::Util::sum() and empty lists...
in thread List::Util::sum() and empty lists...

the sum of an undefined list ought to be an undefined value

The empty list is not undefined; it's very clearly defined: it's empty.

Speaking as a mathematician, of course the sum of an empty list is 0, but this is hardly the first nor the most important time I've encountered software that doesn't follow mathematical conventions. Regardless, the sum 0, @list fix is completely fine.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.