
9 Dec
2004
9 Dec
'04
10:45 a.m.
Douglas Bromley
I've show(n) a particular data type and it shows up as: [([2,6],"British"),([1],"Charles"),([1,8],"Clarke"),([2,6],"Council"),([2],"Edinburgh"),([1],"Education"),([4],"Increasingly")]
What I want to do is format that nicely into a table. Which would give: [2,6],"British" [1],"Charles" [1,8],"Clarke" [2,6],"Council" ......etc
makeIndex = show . shorten . -- [([Int], Word)] -> [([Int], Word)]
I'd use unlines . map (\(f,s)->shows f (',':s)) instead of show; it also gets rid of the quotation marks. -- Cheers, Feri.