some-usable-scripts/haskell/columnv7.hs

4 lines
258 B
Haskell
Raw Normal View History

2016-01-23 01:05:34 +01:00
import Data.List
main = do interact $ (unlines . map unwords . transpose . map (completeMatrix ' ') . transpose . completeMatrix "" . map words . lines)
where completeMatrix v m = map (\e -> e ++ replicate ((maximum $ map length m)- length e) v) m