<div dir="ltr"><span style="font-family:monospace,monospace;font-size:14px">> f :: [input] -> state -> outputs</span><div><font face="monospace, monospace"><br></font></div>.. or with state monad m it could be a combination of<br><br>f :: [input] -> m outputs<br><br>f :: [input] -> outputs  - for intermediate results where state is not R/W<div><br></div><div><br></div><div>state + IO is not too difficult. here is a <a href="http://stackoverflow.com/questions/3640120/combine-state-with-io-actions">very good explanation</a></div><div>I understood the last one - <span style="margin:0px;padding:0px;border:0px">Use liftIO<font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px"> - </span></font></span>best</div></div>