Add foldl1' to Data.Foldable
With the change strict Foldable instances could be written in a simple and performant manner:
maximum = foldl1' max
minimum = foldl1' min
sum = foldl1' (+)
product = foldl1' (*)
Also foldl1' from Data.List gets generalized.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |