<br><br><div class="gmail_quote">On Sat, Aug 22, 2009 at 3:20 PM, staafmeister <span dir="ltr">&lt;<a href="mailto:g.c.stavenga@uu.nl">g.c.stavenga@uu.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
<br>
Thank you for the reply.<br>
<br>
<br>
</div><div class="im">Thomas ten Cate wrote:<br>
&gt;<br>
&gt; Although you most certainly can use a State monad, in most problems<br>
&gt; this isn&#39;t necessary. Most algorithms that you need to solve<br>
&gt; programming contest problems can be written in a purely functional<br>
&gt; style, so you can limit monadic code to just a few helper functions.<br>
&gt;<br>
<br>
</div>Yes I know but there are a lot of problems requiring O(1) array updates<br>
so then you are stuck with IO again</blockquote><div><br></div><div>Not necessarily. The ST monad will usually do just as well.</div></div><br clear="all"><br>-- <br>Sebastian Sylvan<br>