empty

Function empty 

Source
pub fn empty<'a, Brand: Monoid1L0T>() -> Apply1L0T<'a, Brand>
where for<'b> Apply1L0T<'b, Brand>: Monoid<'b>,
Expand description

Returns the identity element for the monoid.

Free function version that dispatches to the type class’ associated function.

§Type Signature

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::functions::empty;

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