4 ms·
That doesn’t sound like the correct reading to me, because foldMap and foldl/foldr have different type signatures https://www.stackage.org/haddock/lts-15.4/bas
by MaxGabriel 7y ago
That doesn’t sound like the correct reading to me, because foldMap and foldl/foldr have different type signatures
https://www.stackage.org/haddock/lts-15.4/base-4.13.0.0/Prelude.html#v:foldMap https://www.stackage.org/haddock/lts-15.4/base-4.13.0.0/Prel...
- im3w1l 7y agoYeah, but they solve basically the same problem. As I mentioned, foldMap requires associativity. Per your link I guess it also requires existence of a neutral element (whereas foldr instead makes you specify a starting element).