AddCommSemigroup
typeclass A: AddCommSemigroup extends AddSemigroup {
commutative(a: A, b: A) {
a + b = b + a
}
}
Extending the additive semigroup with commutativity.
add
Inherited from AddSemigroup.
add_associative
Inherited from AddSemigroup.
commutative
commutative(a: A, b: A) {
a + b = b + a
}
The addition operation must be commutative: a + b = b + a
.