
22 Jan
2005
22 Jan
'05
11:58 p.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.