The Monad type class.
Monad
Allows composition of dependent effectful functions.
This type-class must support the Applicative, Chain and ChainRec algebras and obey the following laws:
Applicative
Chain
ChainRec
M.chain(f, M.of(a)) <-> f(a)
M.chain(M.of, u) <-> u
map
A.map = (f, u) => A.chain(x => A.of(f(x)), u)
References:
Equivalent with the Monad type-class in the static-land specification.
Generated using TypeDoc
The
Monad
type class.Allows composition of dependent effectful functions.
This type-class must support the
Applicative
,Chain
andChainRec
algebras and obey the following laws:M.chain(f, M.of(a)) <-> f(a)
M.chain(M.of, u) <-> u
map
can be derived:A.map = (f, u) => A.chain(x => A.of(f(x)), u)
References:
Equivalent with the
Monad
type-class in the static-land specification.