According to the definition or a monoid the binary operator must be associative e.g. A op (B op C) == (A op B) op C
.
The base mconcat
definition in haskell is:
mconcat = foldr mappend mempty
Since I know the implementation details of the mconcat
function, would anything bad happen from defining and using fake monoids where the function isn't associative? Like for example defining instances for subtraction or division.
Could this be useful or am I missing the point?