Hacker News new | ask | show | jobs
by jackweirdy 3884 days ago
Haskell:

let listsum = foldl (+)

1 comments

You probably want foldl' (+) 0
foldl1 (+) ?
I think its better to give a same result to the empty-list case when its possible.