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))

Required Methods

An associative operation.

In Haskell speak this translates to, concat :: a -> a

Implementors