that seems like the &quot;wrong&quot; way<br><br>check out prettyprint in the standard library<br><br><div><span class="gmail_quote">On 3/9/07, <b class="gmail_sendername">Frozz</b> &lt;<a href="mailto:dj_frozz@hotmail.com">
dj_frozz@hotmail.com</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;">Hi Haskell ppl,<br><br>I&#39;m trying to solve a problem that had been bothering me for a long time. I&#39;m
<br>trying to create index and display the index in Hugs as well as an output text<br>file.<br><br>Below is my code. In Hugs, the index managed to get displayed well with nice<br>alignments. However, for the text file, the alignment is off. The bracket with
<br>the numbers are messy. I really don&#39;t know why this would happen.<br><br>Desired output:<br><br>Anna&nbsp;&nbsp; [1]<br>Ben&nbsp;&nbsp;&nbsp;&nbsp;[2]<br>Shane&nbsp;&nbsp;[3]<br><br><br>dispTable :: [([Int], Word)] -&gt; String<br>dispTable = unlines . map (\ (num,word) -&gt; word ++
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;take (25 - (length word)) (repeat &#39; &#39;)&nbsp;&nbsp;&nbsp;&nbsp;++ show num)<br><br><br>Did i do sth wrong? Thanks in advance.<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">
Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>