Skip to main content

is_monoid

Function is_monoid 

pub fn is_monoid<T, F>(elements: &[T], operation: F) -> bool
where T: Copy + PartialEq, F: Fn(T, T) -> T + Copy,
Expand description

Returns whether elements with operation form a monoid.