Frunk provides developers with a number of functional programming tools like HList, Coproduct, Generic, LabelledGeneric, Validated, Monoid, Semigroup and friends.
//! Holds declarations for some variatiosn of F
//!//! One of the goals of this is to allow for both
//! by reference and by value mapping based purely on
//! the kind of argument taken by the function argument
usekind::*;pubtraitFunctor<A, B>
where Self: Kind<A>,
Self: Kind<B>
{fnmap<F>(self, f: F)-><SelfasKind<B>>::Repr
where F: FnOnce(A) -> B;
}
impl <A, B>Functor<A, B>forOption<A>whereOption<A>:Kind<B>{fnmap<F>(self, f: F)-><SelfasKind<B>>::Repr
where F: FnOnce(A) -> B {matchself{Some(v)=>Some(f(v)),None=>None}}}