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

Jorge Adriano Aires jadrian at mat.uc.pt
Sat Jan 22 23:58:09 EST 2005

> But only some instances (such as []) satisfy this:
>   (mplus a b) >>= c = mplus (a >>= c) (b >>= c)
> Other instances (IO, Maybe) satisfy this:
>   mplus (return a) b = return a
> I think mplus should be separated into two functions. 

How would we implement the first kind in the Maybe instance of MonadPlus?


More information about the Haskell-Cafe mailing list