[Haskell-beginners] Monads...

Erik de Castro Lopo mle+cl at mega-nerd.com
Wed Jan 28 21:57:02 EST 2009


Cory Knapp wrote:

> Hello, so, I'm having a simple problem with monads: I have no idea how 
> to actually use them. I understand the category theory (or, at least 
> well enough to be able to explain "what is a monad");

I come from the complete other end of the spectrum, someone who does
not know category theory, but know many programming languages, including
Ocaml function language much like Haskell, but less pure. It is possible
to use monads in Ocaml, but most code doesn't.

> I understand the 
> way to declare something as a monad instance, but I just don't get how 
> to program with them.

When it comes to coding with Haskell, you can basically ignore monads
and just follow the type signatures.

> Can anyone provide me with, or direct me towards, 
> some simple monads and some ways of using (for example) the monadic 
> properties of lists?

Writing my own monad is something I will tackle when I know I need to.

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"C++ is like jamming a helicopter inside a Miata and expecting
some sort of improvement." -- Drew Olbrich


More information about the Beginners mailing list