Skip to main content

Module cloneable_fn

Module cloneable_fn 

Source
Expand description

Cloneable wrappers over closures for generic handling of functions in higher-kinded contexts.

§Examples

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

let f = cloneable_fn_new::<RcFnBrand, _, _>(|x: i32| x * 2);
assert_eq!(f(5), 10);

Traits§

CloneableFn
A trait for cloneable wrappers over closures, allowing for generic handling of cloneable functions in higher-kinded contexts.

Functions§

new
Creates a new cloneable function wrapper.