4 #if __GLASGOW_HASKELL__ <= 606
5 intercalate xs xss = concat (intersperse xs xss)
8 padWith :: a -> Int -> [a] -> [a]
10 padWith e n [] = replicate n e
11 padWith e (n+1) (h:t) = h:(padWith e n t)
13 formatTable :: [[String]] -> String
15 let columnWidths = map (\col -> maximum $ map length col)
19 let rowCells = zipWith (padWith ' ') columnWidths row in
20 intercalate " " rowCells