Earlier quoted context omitted.
> If __add__ is taken to be any associative operation of a monoid, then Python's sum is merely equivalent to Haskell's mconcat, which is not nearly as general as reduce/foldl I don't have the math to back this up, so please correct me if you know otherwise (and especially if you can demonstrate otherwise, though I know this being wrong is not contingent on that), but: I'm pretty sure `mconcat` with a `map` (or a list…
I don't know much category theory either; my argument is based solely on my knowledge of Haskell. Maybe I'm being obtuse, but I don't quite understand what you mean when you say "mconcat with a map". But to see why mconcat isn't as general as a fold, you need only to take a look at the types: mconcat :: Monoid a => [a] -> a foldl :: (a -> b -> a) -> a -> [b] -> a mconcat is constrained to only operating on monoidal t…
http://byorgey.wordpress.com/2012/11/05/foldr-is-made-of-mon...