that seems like the "wrong" 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> <<a href="mailto:dj_frozz@hotmail.com">
dj_frozz@hotmail.com</a>> 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'm trying to solve a problem that had been bothering me for a long time. I'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't know why this would happen.<br><br>Desired output:<br><br>Anna [1]<br>Ben [2]<br>Shane [3]<br><br><br>dispTable :: [([Int], Word)] -> String<br>dispTable = unlines . map (\ (num,word) -> word ++
<br> take (25 - (length word)) (repeat ' ') ++ 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>