Module
Data.Semigroup.Commutative
- Package
- purescript-group
- Repository
- morganthomas/purescript-group
#Commutative Source
class (Semigroup g) <= Commutative g
A Commutative
is a Semigroup
with a commutative operation. Instances
must satisfy the following law in addition to the semigroup laws:
- Commutativity:
forall x, y. x <> y = y <> x
Instances
Commutative Void
Commutative Unit
(Commutative g) => Commutative (Dual g)
(Semiring r) => Commutative (Additive r)
(CommutativeRing r) => Commutative (Multiplicative r)
Multiplication commutes only for a
CommutativeRing
.
Addition commutes for any
Semiring