"Brandon S. Allbery KF8NH" <allb...@ece.cmu.edu> writes: > On May 8, 2010, at 01:16 , Ivan Lazar Miljenovic wrote: >> Huh? What about "maybeAdd (Just 2) Nothing" ? > > Isn't that handled by the definition of (>>=) in Maybe, as opposed to > by invoking fail? > >> instance Monad Maybe where >> -- ... >> Nothing >>= _ = Nothing >> (Just x) >>= f = f x
Yes, but isn't the "y <- Nothing" pattern failure handled by invoking fail? -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe