Skip to main content

is_commutative

Function is_commutative 

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

Returns whether operation is commutative over elements.