empty

Function empty 

Source
pub fn empty<'a, Brand: Monoid<'a>>() -> Apply0<Brand>
Expand description

Returns the identity element for the monoid.

Free function version that dispatches to the typeclass’ associated function.

§Type Signature

forall a. Monoid a => () -> a

§Returns

The identity element which, when combined with any other element using the semigroup operation, leaves the other element unchanged.

§Examples

use fp_library::{brands::StringBrand, functions::empty};

assert_eq!(empty::<StringBrand>(), "".to_string());