applicative(A) = [A] | fn(term(), A) | either(term(), A) | maybe(A)
either(A, B) = {error, A} | {ok, B}
fn(A, B) = fun((A) -> B)
fn(A) = fun(() -> A)
functor(A) = [A] | map(A) | fn(term(), A) | either(term(), A) | maybe(A)
map(A) = #{term() := A}
maybe(A) = {just, A} | nothing
monad(A) = [A] | either(term(), A) | maybe(A)
bind/2 | |
do/2 | |
fmap/2 | |
liftA2/2 | |
pure/1 | |
then/2 |
liftA2(A1::applicative(fn(A, B)), A2::applicative(A)) -> applicative(B)
pure(A) -> monad(A) | A
Generated by EDoc