From db7d66ac2533ec21c4e8ac2e54a63bf3d3b7c6cc Mon Sep 17 00:00:00 2001 From: karchnu Date: Mon, 18 Jan 2016 18:18:46 +0100 Subject: [PATCH] Franchement, 7 lignes c'est pour les faibles --- haskell/columnv6.hs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 haskell/columnv6.hs diff --git a/haskell/columnv6.hs b/haskell/columnv6.hs new file mode 100644 index 0000000..1bfce74 --- /dev/null +++ b/haskell/columnv6.hs @@ -0,0 +1,5 @@ +import Data.List as L + +main = do content <- getContents + 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