[Haskell-cafe] Re: what is inverse of mzero and return?

Jules Bean jules at jellybean.co.uk
Tue Jan 25 04:44:14 EST 2005


On 25 Jan 2005, at 09:30, Daniel Fischer wrote:

> putStrLn "hello" >>= (\_ -> mzero)
>  ===
> (\_ -> mzero) ()

...no. That last identity holds for 'return ()' but not for 'putStrLn 
"hello"'.

The monad law is a law for 'return'  not for arbitrary things.

Jules



More information about the Haskell-Cafe mailing list