# Monads in Haskell

A monad establishes a context, separated by a general interface. Different instances of a Monad type-class introduce specialized contexts.

Once values or functions are lifted into a given context (using a Functor instance) there is no way back.

To be applied to a lifted value a function itself must be lifted in the same context. In practice, an appropriate instance of a Functor type (`fmap`

function) must be used.

A Functor could even be derived for an algebraic data type.

A Monad establishes a context, an abstraction barrier. Functor does lifting and mapping.

`(>>=)`

has to take a Kleisli arrow as a parameter, which does lifting. `return`

is one of those.

**Note:**See TracWiki for help on using the wiki.