[Haskell-cafe] What is MonadPlus good for?
tullsen at galois.com
Mon Feb 14 15:03:53 EST 2005
Here's an example: In my paper "First Class Patterns"
by defining the pattern combinators using MonadPlus, you get standard
pattern matching with the Maybe
instance of MonadPlus and you get backtracking pattern matching with
the  (list) instance of MonadPlus.
On Feb 12, 2005, at 10:08 AM, Benjamin Pierce wrote:
> I have seen lots of examples that show how it's useful to make some
> constructor into an instance of Monad.
> Where can I find examples showing why it's good to take the trouble to
> that something is also a MonadPlus? (I know there are many examples of
> things that *are* MonadPluses; what I want to know is why this is
> interesting. :-)
> - Benjamin
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe