A sequential computation framework with wrapping the type S. All instances of the monad m must satisfy the following laws:
S
m
f
a
m.flatMap(f)(m.pure(a))
f(a)
m.flatMap(m.pure)(a)
g
m.flatMap(f)(m.flatMap(g)(a))
m.flatMap((x) => m.flatMap(f)(g(x)))(a)
A sequential computation framework with wrapping the type
S. All instances of the monadmmust satisfy the following laws:fanda;m.flatMap(f)(m.pure(a))equals tof(a),a;m.flatMap(m.pure)(a)equals toa,f,ganda;m.flatMap(f)(m.flatMap(g)(a))equals tom.flatMap((x) => m.flatMap(f)(g(x)))(a).