pub trait Semigroup {
fn concat<T>(self, other: T) -> T;
}
Expand description
A set with an associative operation is a Semigroup
.
The class of semigroups (types with an associative binary operation). Instances should satisfy the following:
- Associativity
x.concat(y.concat(z)) = z.concat(x.concat(y))