You&#39;re looking for mapM_<br>
mapM_ :: (Monad m) =&gt; (a -&gt; m b) -&gt; [a] -&gt; m ()<br>
(see also sequence_ :: (Monad m) =&gt; [m a] -&gt; m () )<br>
<br>
I don&#39;t think that it is possible to have a 1-tuples, just 2 and up. () is a unit rather than a 0-tuple, apparently:<br>
<a href="http://www.haskell.org/onlinereport/basic.html#sect6.1.4" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.haskell.org/onlinereport/basic.html#sect6.1.4</a><br><br><div><span class="gmail_quote">On 10/03/2008, <b class="gmail_sendername">Paulo J. Matos</b> &lt;<a href="mailto:pocm@soton.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pocm@soton.ac.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hello all,<br> <br> I find it funny that IO () is different from IO [()].<br> For example, if I define a function to output some lines with mapT, I would do:<br> outputLines :: Int -&gt; IO ()<br> outputLines i = mapM (putStrLn . show) (take i $ iterate ((+) 1) 1)<br>

 <br> However, this is in fact<br> outputLines :: Int -&gt; IO [()]<br> <br> I would like to know if in fact there&#39;s any difference in practice<br> between (), [()], i.e. if in practice the difference matters.<br> My first guess is that this is just a consequence of the Haskell type<br>

 system and so that everything fits this really needs to be like this.<br> Because<br> mapM :: (Monad m) =&gt; (a -&gt; m b) -&gt; [a] -&gt; m [b]<br> <br> So I guess that it makes sense that you get IO [()] instead of IO (),<br>

 and adding an exception just to say that [()] == () isn&#39;t good.<br> By the way, as a consequence can you possibly get IO (()) or IO ([()])<br> and are these all different from each other?<br> <br> Cheers,<br> <br> --<br>

 Paulo Jorge Matos - pocm at <a href="http://soton.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">soton.ac.uk</a><br> <a href="http://www.personal.soton.ac.uk/pocm" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.personal.soton.ac.uk/pocm</a><br>
 PhD Student @ ECS<br> University of Southampton, UK<br>
 Sponsor ECS runners - Action against Hunger:<br> <a href="http://www.justgiving.com/ecsrunslikethewind" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.justgiving.com/ecsrunslikethewind</a><br>
 _______________________________________________<br> Haskell-Cafe mailing list<br>
 <a href="mailto:Haskell-Cafe@haskell.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Haskell-Cafe@haskell.org</a><br> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
 </blockquote></div><br>