On Sat, Aug 22, 2009 at 3:20 PM, staafmeister <g.c.stavenga@uu.nl> wrote:


Thank you for the reply.


Thomas ten Cate wrote:
>
> Although you most certainly can use a State monad, in most problems
> this isn't necessary. Most algorithms that you need to solve
> programming contest problems can be written in a purely functional
> style, so you can limit monadic code to just a few helper functions.
>

Yes I know but there are a lot of problems requiring O(1) array updates
so then you are stuck with IO again

Not necessarily. The ST monad will usually do just as well.


--
Sebastian Sylvan