pub trait Functor<B>: HKT<B> {
    fn fmap<F>(&self, f: F) -> Self::M
    where
        F: Fn(&Self::A) -> B
; }
Expand description

Functor type class

Required methods

Functor map

Examples
use funlib::Functor;
let n = Some(1).fmap(|i| i * 4);
assert_eq!(Some(4), n);

Implementations on Foreign Types

Implementors