Provide a strict version of sum
When adding huge list of numbers, a strict version of sum
is preferred to avoid an unnecessary use of memory. A strict version of sum
can be easily written using foldl'
but it'd be nicer if a function such as:
sum' = foldl' (+) 0
would be provided in the prelude already.
Does this makes sense?
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Prelude |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |