Skip to main content

zero

Function zero 

Source
pub fn zero<S: Semiring>() -> S
Expand description

Returns the additive identity element.

Free function version that dispatches to Semiring::zero.

§Type Signature

forall S. Semiring S => () -> S

§Type Parameters

  • S: The semiring type.

§Returns

The additive identity (zero).

§Examples

use fp_library::classes::semiring::zero;

assert_eq!(zero::<i32>(), 0);