[Haskell-cafe] Monad explanation

Tymur Porkuian shooshpanchick at gmail.com
Wed Feb 4 16:13:44 EST 2009

Actually, I understand these types in terms of containers that
override standard method of function application for their contents.
In fact, there may be no contents, or several items, or nothing at
all, or something strange, but the container behaves like there is a
value of some type inside it.

In these terms:
Maybe - container that may or may not contain something
[a] - container that contains several values and applies function to all of them
State - container that has some other "secondary" value in it.
IO - container that remembers passed functions and later will ask user
for value, then apply functions to it.

> * Monad: A monad M allows a function of n arguments (for n >= 0) to be
> applied to n M values; in addition, if the function returns an M value
> itself, you can combine that result with the arguments in a sensible
> way.

Here, what does "sensible" mean? What do we override?

Also, would it be right to say that Arrow is a container for functions
that overrides function chaining?

More information about the Haskell-Cafe mailing list