
23 Jan
2005
23 Jan
'05
4:58 a.m.
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? J.A.