Type-class laws for Monad, as defined in the funland sub-project, mirroring the static-land spec.
Monad
funland
static-land
Monad inherits the laws of Applicative and of Chain and in addition must obey:
Applicative
Chain
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)
Generated using TypeDoc
Type-class laws for
Monad
, as defined in thefunland
sub-project, mirroring thestatic-land
spec.Monad
inherits the laws ofApplicative
and ofChain
and in addition must obey: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)