4 ms·
Both set union and number addition are examples of monoids, a maths concept from the field of abstract algebra. So there is a maths abstraction that unites thes
by noelwelsh 7y ago
Both set union and number addition are examples of monoids, a maths concept from the field of abstract algebra. So there is a maths abstraction that unites these ideas.
- xyelos 7y agoUhh quick limiting thing here (although I agree that the addition symbol is fine): the existence of a unifying math concept alone does not justify using the "+" symbol. By that argument, notating permutation conjugation with a "+" is fine, but that would be a notational sin as the "+" operator is reserved for commutative operations. However, with that disclaimer, noting that both operations form monoids and both are commutative justifies the "+".
- wyager 7y agoHaskell doesn't use the + symbol for monoids, it uses <>.