Functor

pub trait Functor<A, B>: Send + Sync {
    // Required method
    fn fmap(&self, f: Box<dyn Fn(A) -> B + Send + Sync>) -> SklResult<B>;
}
Expand description

Trait for functor pattern

Required Methods§

Source

fn fmap(&self, f: Box<dyn Fn(A) -> B + Send + Sync>) -> SklResult<B>

Map function over the functor

Implementors§