<div dir="ltr">On Thu, Sep 18, 2008 at 10:02 AM, Creighton Hogg <span dir="ltr">&lt;<a href="mailto:wchogg@gmail.com">wchogg@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
If this makes anyone cringe or cry &quot;you&#39;re doing it wrong&quot;, I&#39;d<br>
actually like to hear it.</blockquote><div><br>Yes, that made me cry :-)&nbsp; Your code seems very convoluted, and quite successfully hides what it&#39;s really trying to do. Here&#39;s a version that is rather more concise, and which will be far faster besides.<br>
<br>import qualified Data.ByteString.Lazy.Char8 as B<br>import System.Environment<br><br>main = mapM_ ((print =&lt;&lt;) . fmap (B.count &#39;\n&#39;) . B.readFile) =&lt;&lt; getArgs<br><br></div></div></div>