Skip to main content

is_distributive_over

Function is_distributive_over 

pub fn is_distributive_over<T, Mul, Add>(
    elements: &[T],
    multiply: Mul,
    add: Add,
) -> bool
where T: Copy + PartialEq, Mul: Fn(T, T) -> T + Copy, Add: Fn(T, T) -> T + Copy,
Expand description

Returns whether multiply distributes over add from both sides on elements.