
22 Jan
2005
22 Jan
'05
6:33 p.m.
Daniel Fischer wrote:
That's probably a misunderstanding due to the notation, in the [] monad, it's
just
concat (map c (a ++ b)) = concat (map c a) ++ concat (Map c b),
which is easily seen to be true (if applying c to an element of a causes an error, neither side will go past that).
Daniel
So do we consider [] to be fail?, Monad.hs defines: instance MonadPlus [] where mzero = [] mplus = (++) What would happen if this was the definition? instance MonadPlus [] where mzero = [] mplus a b | a == [] = b | otherwise = a Keean.