higher-cat 0.1.1

Functors, Applicatives, Monads and other bad ideas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{Apply, Functor, Pure};

/// An `Applicative` functor is anything which implements `Functor`, `Apply` and
/// `Pure`.
pub trait Applicative<A, F, B>: Functor<A, B> + Apply<A, F, B> + Pure<A>
where
    F: Fn(A) -> B,
{
}

impl<M, A, F, B> Applicative<A, F, B> for M
where
    M: Functor<A, B> + Apply<A, F, B> + Pure<A>,
    F: Fn(A) -> B,
{
}