Trait naan::functor::FunctorOnce

source ·
pub trait FunctorOnce<F, A>where
    F: HKT1<T<A> = Self>,{
    // Required method
    fn fmap1<AB, B>(self, f: AB) -> F::T<B>
       where AB: F1Once<A, Ret = B>;
}
Expand description

Functor, but specialized to know at compile-time that the mapping function will only be called one time.

Required Methods§

source

fn fmap1<AB, B>(self, f: AB) -> F::T<B>where AB: F1Once<A, Ret = B>,

Implementations on Foreign Types§

source§

impl<A, E> FunctorOnce<ResultOk<E>, A> for Result<A, E>

source§

fn fmap1<AB, B>(self, f: AB) -> Result<B, E>where AB: F1Once<A, Ret = B>,

source§

impl<A> FunctorOnce<Option, A> for Option<A>

source§

fn fmap1<AB, B>(self, f: AB) -> Option<B>where AB: F1Once<A, Ret = B>,

Implementors§

source§

impl<T> FunctorOnce<Id, T> for Id<T>