Trait alga::general::Magma [] [src]

pub trait Magma<O: Op>: Sized + Clone {
    fn operate(self, Self) -> Self;

    fn op(self, _: O, lhs: Self) -> Self { ... }
}

Types that are closed under a given operator.

a, b ∈ Self ⇒ a ∘ b ∈ Self

Required Methods

Performs an operation.

Provided Methods

Performs specific operation.

Implementors