Behaviours: do_applicative, do_functor, do_monad.
either(A, B) = {error, A} | {ok, B}
fn(A, B) = fun((A) -> B)
fn(A) = fun(() -> A)
map(A) = #{term() := A}
maybe(A) = {just, A} | nothing
monad(A) = [A] | either(term(), A) | maybe(A)
traversable(A) = [A] | map(A)
bind/2 | |
do/2 | |
fmap/2 | |
lift/1 | |
liftA2/2 | |
liftm/2 | |
pure/1 | |
sequence/1 | |
then/2 |
bind(List::[A], F::fn(A, [B])) -> [B]
fmap(F::fn(A, B), List::[A]) -> [B]
liftA2(List1::[fn(A, B)], List2::[A]) -> [B]
liftm(F::function(), Lists::[list()] | [fn(list())]) -> list()
pure(A) -> [A]
sequence(Lists::traversable([A])) -> [traversable(A)]
then(List::list(), F::fn([A])) -> [A]
Generated by EDoc