pub fn multiply<S: Semiring>(a: S, b: S) -> SExpand description
Multiplies two values.
Free function version that dispatches to Semiring::multiply.
§Type Signature
forall S. Semiring S => (S, S) -> S
§Type Parameters
S: The semiring type.
§Parameters
a: The first value.b: The second value.
§Returns
The product of the two values.
§Examples
use fp_library::classes::semiring::multiply;
assert_eq!(multiply(2i32, 3), 6);