Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import System
- import List
- main = do
- files <- getEnv "F"
- let
- readall (w:ws) c = do
- c2 <- readFile w
- readall ws (c2:c)
- readall [] c = return (reverse c)
- samelength cs r = map (\c -> (c ++ replicate ((maximum.(map length)) cs - (length c)) r)) cs
- fix cs = map (\c -> samelength c ' ') $ samelength cs ""
- content <- readall (words files) []
- putStrLn $ unlines.(map unwords).transpose.fix.(map lines) $ content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement