
28 Jul
2010
28 Jul
'10
6:03 a.m.
I'm looking at Douglas Auclair's MonadPlus article, here http://www.haskell.org/sitewiki/images/6/6a/TMR-Issue11.pdf So consider an example like t2 = do x <- [1,2,3] y <- [1,2] guard $ x+y > 2 return (x,y) This uses the list instance of MonadPlus. Now, Douglas is talking about his own code, not the above example, but his own code is similar. And he says "the entire computation is chained by mplus". I'm confused because I thought it was chained by
=. In fact, I can't see where the above code makes use of mplus. The definition of "guard" uses mzero.