2009/12/28 CK Kashyap <[email protected]>: > 1. Comments about the functions I've written
Maybe your indentation was eaten by your mailer; but please indent the operations within a `do' block and the definitions under a `where'. You should make a `Functor' instance since monads are all functors (though the typeclass does not enforce this). > 2. I've used the do notation at the bottom which is a result > of my List being a Monad - are there any other benefits that > comes in because of List being a Monad? What would MonadPlus > provide me? You can use `guard' and `when' and other monadic operations. The `MonadPlus' instance gives you access to `msum'. It's not just about `do' notation :) > 3. The comprehension syntax for Lists in Haskell - can that be > used in anyway for other Monads? Not anymore, though Gofer used to allow "monad comprehensions". -- Jason Dusek _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
