foldl' is not a good consumer
Some fancy footwork went into making length a good consumer. Since length = foldl' (\n _ -> n + 1) 0
, I was wondering if a trick similar to the one used for length might work for more general strict left folds.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | ekmett, hvr |
Operating system | |
Architecture |