Outdated documentation for foldl and friends
Straight from Data.Foldable
, here is the documentation for foldl
:
-- | Left-associative fold of a structure.
--
-- @'foldl' f z = 'Prelude.foldl' f z . 'toList'@
But, of course, Prelude.foldl
is the same foldl
!
There are other functions with similar problems.
When revising these, please put in (back?) examples of how these work, at least on lists. I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my foldl
and foldr
straight. Maybe it's because my brain is small, but we don't want to exclude people with small brains!