[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Request to review my attempt at understanding Monads

Subject: Re: [Haskell-cafe] Request to review my attempt at understanding Monads
From: CK Kashyap
Date: Tue, 29 Dec 2009 02:07:11 -0800 PST
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


      

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>