<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Here's (attached) a screen shot of the post I received from you.&nbsp; 
There's your name after the "From:" at the top. Also, this post is a reply, so your message follows. Was there a mix up? <br>
<br>Michael<br><br><br>--- On <b>Sat, 12/18/10, Thomas Davie <i>&lt;tom.davie@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Thomas Davie &lt;tom.davie@gmail.com&gt;<br>Subject: Re: [Haskell-cafe] Why is Haskell flagging this?<br>To: chrisdone@googlemail.com<br>Cc: "michael rice" &lt;nowgate@yahoo.com&gt;, haskell-cafe@haskell.org<br>Date: Saturday, December 18, 2010, 2:38 PM<br><br><div id="yiv823900144"><br><div><div>On 17 Dec 2010, at 21:44, Christopher Done wrote:</div><br class="yiv823900144Apple-interchange-newline"><blockquote type="cite"><div class="yiv823900144gmail_quote">On 17 December 2010 18:04, michael rice <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:nowgate@yahoo.com" target="_blank" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="yiv823900144gmail_quote" style="margin: 0pt 0pt 0pt
 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><span style="font-family: courier,monaco,monospace,sans-serif;">===================<br><br>f :: [Int] -&gt; IO [Int]</span><br style="font-family: courier,monaco,monospace,sans-serif;">

<span style="font-family: courier,monaco,monospace,sans-serif;">f lst = do return lst</span><br style="font-family: courier,monaco,monospace,sans-serif;"><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">main = do let lst = f [1,2,3,4,5]</span><br style="font-family: courier,monaco,monospace,sans-serif;">

<span style="font-family: courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fmap (+1) lst</span></td></tr></tbody></table></blockquote><div>&nbsp;</div><div>The problem is that you are applying fmap to a type IO a.</div><div><br>
</div>
<div>fmap (+1) (return [1,2,3])</div><div><br></div><div>But to achieve the behaviour you expect, you need another fmap:</div><div><br></div><div>fmap (fmap (+1)) (return [1,2,3])</div></div></blockquote><br></div><div>Which can be more neatly written with Conal's semantic editor cominators as</div><div><br></div><div>(fmap . fmap) (+1) (return [1,2,3])</div><div><br></div><div>Of course, I question why the list is put in the IO monad at all here... surely this would be much better</div><div><br></div><div>return $ fmap (+1) [1,2,3]</div><br><div>Finally, that has the wrong type for main... perhaps you meant to print it out?</div><div><br></div><div>main :: IO ()</div><div>main = print $ fmap (+1) [1,2,3]</div><div><br></div><div>Bob</div></div></blockquote></td></tr></table><br>