Function lattices::algebra::distributive
source ยท pub fn distributive<S: Debug + PartialEq + Clone, const N: usize>(
items: &[S; N],
f: &impl Fn(S, S) -> S,
g: &impl Fn(S, S) -> S,
) -> Result<(), &'static str>
Expand description
Defines the distributive property
a(b+c) = ab + ac and (b+c)a = ba + ca