Skip to main content

Module plus

Module plus 

Source
Expand description

The identity element for Alt, forming a monoid on type constructors.

Plus is to type constructors as Monoid is to concrete types.

§Examples

use fp_library::{
	brands::*,
	classes::*,
	functions::*,
};

let x = alt::<OptionBrand, _>(plus_empty::<OptionBrand, i32>(), Some(5));
assert_eq!(x, Some(5));

Traits§

Plus
A type class extending Alt with an identity element.

Functions§

empty
Returns the identity element for alt.