[Haskell-cafe] A question about "monad laws"

Neil Mitchell ndmitchell at gmail.com
Mon Feb 11 08:59:09 EST 2008


Hi

> > (x >>= f) >>= g == x >>= (\v -> f v >>= g)
>
> Or stated another way:
>
> (x >>= f) >>= g == x >>= (f >>= g)

Which is totally wrong, woops.

See this page for lots of details about the Monad Laws and quite a
nice explanation of where you use them:
http://www.haskell.org/haskellwiki/Monad_Laws

Thanks

Neil


More information about the Haskell-Cafe mailing list