Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # one liner udgave:
- F="a.txt b.txt c.txt" ghc -e 'do files <- System.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).(List.transpose).fix.(map lines) $ content'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement