Douglas Bromley <[EMAIL PROTECTED]> writes: > 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. _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe