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

Ashley Yakeley ashley at semantic.org
Sat Jan 22 04:09:26 EST 2005


In article <41F211FB.3030706 at imperial.ac.uk>,
 Keean Schupke <k.schupke at imperial.ac.uk> wrote:

> This fits the above description, but I don't see how the following can 
> be true:
> 
>     (mplus a b) >>= c = mplus (a >>= c) (b >>= c)

Try it (and my test code) with [], which is an instance of MonadPlus. 
mplus is defined as (++) for [].

-- 
Ashley Yakeley, Seattle WA



More information about the Haskell-Cafe mailing list