1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use super::{Functor, GenType};
pub trait Applicative<'a, A>: GenType + Functor<'a, A> {
type PureT<T>
where
T: 'a,
A: 'a;
fn pure(a: Self::PureT<A>) -> Self::Type<Self::PureT<A>>;
#[must_use]
fn app<F, B>(self, f: Self::Type<F>) -> Self::Type<B>
where
F: Fn(A) -> B + 'a,
B: 'a;
}