Function fmap::monad_apply

source ·
pub fn monad_apply<'a, T, B>(
    monad: T,
    f: T::MapperMonad
) -> <T as Functor<'a, B>>::Mappedwhere
    T: 'a + Send + Clone + MonadWithMapper<'a, B>,
Expand description

Generic implementation of Applicative::apply for Monads

This generic implementation can be used to define Applicative::apply based on Monad::bind, Functor::fmap, and Clone::clone when the applicative functor is also a monad and is Send and Clone. A more specific implementation might be more efficient.