Closed jacereda closed 7 years ago
I thought it had laws because http://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Foldable.html states that
Foldable instances are expected to satisfy the following laws:
foldr f z t = appEndo (foldMap (Endo . f) t ) z foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z fold = foldMap id
and
If the type is also a Functor instance, it should satisfy
foldMap f = fold . fmap f
Oh, right. I'll remove it.
I think
Foldable
is technically lawless, but these look like good properties to have even if they're not officially required. Thanks!