replicate + interact => 3 lignes
This commit is contained in:
parent
e71053e3b8
commit
499fa18707
3
haskell/columnv7.hs
Normal file
3
haskell/columnv7.hs
Normal file
@ -0,0 +1,3 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user