A Monad is a type of computations together with two primitive operations.
A computation of some type

*a* is a way of (possibly) obtaining a value of type

*a* which may involve complications, such as side effects or failure.
The first primitive operation, "unit", takes some value and returns the trivial computation which just returns that value unchanged.

The second, "bind", takes a computation of some type

*a* and function which takes a value of type

*a* and yields a computation of type

*b* and yields a computation of type

*b*.
It is intended to provide composition of computations where the second computation takes an input which is the type of value delivered by the first.