From e71053e3b880cd930ed48b0769857cdb8875d443 Mon Sep 17 00:00:00 2001 From: karchnu Date: Thu, 21 Jan 2016 18:33:31 +0100 Subject: [PATCH] =?UTF-8?q?gratt=C3=A9=202=20caract=C3=A8res=20et=20une=20?= =?UTF-8?q?ligne=20vide,=20toujours=20=C3=A7a=20de=20pris?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- haskell/columnv6.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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