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")]
Let me guess: type [([Integer],String)]? > What I want to do is format that nicely into a table. Since you (probably) want one list entry on a line, why not format each entry as a string, and output each string as a line? You may find the function "unlines" to be helpful. > The best way of doing (I thought) was to: > Remove the first "[(" and final ")]" > Then replace "),(" with a newline(\n) If you really want to do this (reformat the string), you could perhaps write a function that substitutes a substring for something else, perhaps using "isPrefixOf", "drop" and "take". But this will be a more fragile design than working from the original data strucure. -kzm -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe