[Haskell-beginners] Are monads pure?

Amy de Buitléir amy at nualeargais.ie
Mon May 17 23:28:45 EDT 2010

When I first started learning Haskell, I was under the impression that
monads provided a way to encapsulate some imperative code so it didn't
"contaminate" your functional code. But I think that's a misconception that
I got because the first monad I dealt with was IO. Lately I've been reading
more about monads, and (aside from IO), they are purely functional, aren't
they? If they have state, they deal with it in a purely functional way.
Behind the scenes, they thread the state through your computations so that
you don't you don't have to bother with it. Is that correct? TIA.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100517/0e7d558e/attachment.html

More information about the Beginners mailing list