From 63a602b979979042cc40387cf8aab20c11a8b167 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Sat, 23 Jan 2016 14:11:47 +0100 Subject: [PATCH] $ inutile avec interact --- haskell/columnv7.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell/columnv7.hs b/haskell/columnv7.hs index f28c4f5..db328be 100644 --- a/haskell/columnv7.hs +++ b/haskell/columnv7.hs @@ -1,3 +1,3 @@ import Data.List -main = interact $ (unlines . map unwords . transpose . map (pad ' ') . transpose . pad "" . map words . lines) +main = interact (unlines . map unwords . transpose . map (pad ' ') . transpose . pad "" . map words . lines) where pad v m = map (\e -> e ++ replicate ((maximum $ map length m)- length e) v) m