AW: Newbie qustion about monads

Markus.Schnell at Markus.Schnell at
Thu Oct 2 14:16:13 EDT 2003

> I'm not trying to create useful monads (I'm pretty sure they 
> aren't :),
> but understanding the concepts. So, the question remains: 
> when the monad
> laws say that
>   (return x) >>= f == f x

The Monad class is just called Monad because it is intended
to cover a monad. But it doesn't ensure the laws. That is your
sole responsibility.

> what is intended in that "=="? Eq."==" for

You can define it to your liking as long as it is commutative.


More information about the Haskell-Cafe mailing list