pub fn ring<S: Debug + PartialEq + Clone, const N: usize>(
items: &[S; N],
f: &impl Fn(S, S) -> S,
g: &impl Fn(S, S) -> S,
zero: S,
one: S,
b: &impl Fn(S) -> S,
) -> Result<(), &'static str>
Expand description
Defines a ring structure.
A ring is a semiring with an inverse operation on f.