Hacker News new | ask | show | jobs
by millstone 1960 days ago
It seems like the monoid-thinking just obscures. Positive integers under addition are not a monoid (no identity) but you can still map-reduce their sum of squares. All that you really need is associativity, and associative operations are associative.
2 comments

That’s a semigroup.
Indeed, the identity is only required to deal with an empty input.