category_identity

Function category_identity 

Source
pub fn category_identity<'a, Brand: Category, A: 'a>() -> Apply1L2T<'a, Brand, A, A>
Expand description

Returns the identity morphism.

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

§Type Signature

forall a. Category c => () -> c a a

§Returns

The identity morphism.

§Examples

use fp_library::{brands::RcFnBrand, functions::category_identity};

assert_eq!(category_identity::<RcFnBrand, _>()(()), ());