Hey everyone,
What is the difference between MonadPlus and Alternative? In my mind, it would
make sense for the difference to be that the former provides "and" semantics
(i.e., x `mplus` y means do both x and y) whereas the latter provides "or"
semantics (i.e., x <|> y means do x or y but not both). However, when I look
at the instances defined for List I see that it is exactly the same as
MonadPlus.
So is there any difference between the interpretation of MonadPlus and
Alternative, or is the only difference between them that the former applies to
Monad whereas the latter applies to Applicative?
Also, along similar lines, why does MonadPlus exist when it is essentially just
a special case of Monoid? (That is, any MonadPlus instance could be
equivalently cast as a Monoid instance.)
Thanks!
Greg
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe