[Haskell-cafe] Haskell spacing problem.
d.w.mead at gmail.com
Fri Mar 9 08:05:59 EST 2007
that seems like the "wrong" way
check out prettyprint in the standard library
On 3/9/07, Frozz <dj_frozz at hotmail.com> wrote:
> Hi Haskell ppl,
> I'm trying to solve a problem that had been bothering me for a long time.
> trying to create index and display the index in Hugs as well as an output
> Below is my code. In Hugs, the index managed to get displayed well with
> alignments. However, for the text file, the alignment is off. The bracket
> the numbers are messy. I really don't know why this would happen.
> Desired output:
> Anna 
> Ben 
> Shane 
> dispTable :: [([Int], Word)] -> String
> dispTable = unlines . map (\ (num,word) -> word ++
> take (25 - (length word)) (repeat ' ') ++ show num)
> Did i do sth wrong? Thanks in advance.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe