pub trait Functor<B>: HKT<B> { fn fmap<F>(&self, f: F) -> Self::M where F: Fn(&Self::A) -> B; }
Functor type class
Functor map
use funlib::Functor; let n = Some(1).fmap(|i| i * 4); assert_eq!(Some(4), n);