
22 Jan
2005
22 Jan
'05
3:20 p.m.
Ashley Yakeley wrote:
In article <41F211FB.3030706@imperial.ac.uk>, Keean Schupke
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 [].
but what if (a >>= c) causes c to fail, and (b >>= c) lets c succeed. In this case the LHS will fail, whereas the RHS will succeed I think? Keean.