
29 Dec
2009
29 Dec
'09
5:07 a.m.
Thanks Jason,
You should make a `Functor' instance since monads are all functors (though the typeclass does not enforce this).
What are the benefits of making it an instance of Functor?
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 :)
I'd appreciate it very much if you could give me some pointers on the usages of guard, when and msum. Regards, Kashyap