Trait functional::Monoid [] [src]

pub trait Monoid<T: AssociativeOperation<Self>>: Semigroup<T> {
    fn one() -> Self;
}

Monoid is Semigroup with neutral element for is's operation

Required Methods

fn one() -> Self

Get the neutral element if T: Monoid<Op> and r: T then Op::apply(T::one(), r) == r

Implementors