[Haskell-cafe] Monad explanation

Tymur Porkuian shooshpanchick at gmail.com
Wed Feb 4 16:55:06 EST 2009


> Huh?  You can't actually over-ride function application --- Haskell's
> built-in application always does exactly the same thing, at every type.

It's a metaphor. In every case container has its own method of
applying functions to its contents - e.g. instead of "f x" we write "x
fmap f".

> You can, however, define new application-like operators that have other
> application-like behaviors.  Haskell has a few of these:
>
> * return
> * (<$>)
> * (<*>)
> * (>>=)

I know Haskell, that's not what I'm talking about. What I'm trying to
do is to create a simple explanation for monads that doesn't involve
neither mathematics nor "computation" metaphor.


More information about the Haskell-Cafe mailing list