Function lattices::algebra::semigroup

source ยท
pub fn semigroup<S: Debug + PartialEq + Clone, const N: usize>(
    items: &[S; N],
    f: &impl Fn(S, S) -> S,
) -> Result<(), &'static str>
Expand description

Defines a semigroup structure.

A semigroup is a set of items along with an associative binary operation f.