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

Defines a commutative monoid structure. A commutative monoid is a monoid where the operation f is commutative.