diff --git a/haskell/columnv6.hs b/haskell/columnv6.hs index 1bfce74..e08a8f0 100644 --- a/haskell/columnv6.hs +++ b/haskell/columnv6.hs @@ -1,5 +1,4 @@ import Data.List as L - main = do content <- getContents - putStr $ unlines $ map unwords $ L.transpose $ map (completeMatrix ' ') $ L.transpose $ (completeMatrix "") $ map words $ (lines content) + putStr $ unlines $ map unwords $ L.transpose $ map (completeMatrix ' ') $ L.transpose $ completeMatrix "" $ map words $ lines $ content where completeMatrix v m = map (\e -> e ++ [v| _ <- [length e .. (\ x -> maximum $ map length x) m ]]) m