[Haskell-cafe] Re: Lists and monads

Vo Minh Thu noteed at gmail.com
Mon Jul 26 09:19:21 EDT 2010

2010/7/26 Kevin Jardine <kevinjardine at gmail.com>:
> On Jul 26, 3:00 pm, Vo Minh Thu <not... at gmail.com> wrote:
>> Also, just like with IO, maybe restructuring the code to separate
>> monadic code would help.
> The specific monad I am dealing with carries state around inside it.
> I could revert to a pure system in many cases by simply passing the
> state as a parameter but then that defeats the point of the monad and
> clutters up my function calls.
> Also, in other cases, I am using a module that defines its own monads
> and have no choice but to use them.
> I think I would prefer a style of programming where monads are equal
> citizens to pure function calls. There are various hints that such a
> style of programming is possible but as I say, I have not found any
> clear tutorials on it.

Maybe you missed the part of my answer hinting to applicative style?
LYAH has a chapter about it[0]. There are other resources about it. I
believe there is a well-known paper that introduced the idea and is
quite readable. RWH uses it with Parsec.

[0] http://learnyouahaskell.com/functors-applicative-functors-and-monoids

More information about the Haskell-Cafe mailing list