Re:Haskell People
by nine_k on Sunday October 01, 2017 @10:11AM
(#15377903)
It does if you specify a sequence of list as the first argument, and an empty list as an initial value.
[ Parent
| on HN ]
This is because the start argument defaults to 0. It doesn't make sense to add a list and 0.
The same thing does not work for a sequence of strings and an empty string.
sum(["abc","def"], "")
Throws TypeError: sum() can't sum strings [use ''.join(seq) instead]