Advertisement
Guest User

Untitled

a guest
Jul 10th, 2011
817
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import System
  2. import List
  3.  
  4. main = do
  5.         files <- getEnv "F"
  6.         let
  7.                 readall (w:ws) c = do
  8.                         c2 <- readFile w
  9.                         readall ws (c2:c)
  10.                 readall [] c = return (reverse c)
  11.                 samelength cs r = map (\c -> (c ++ replicate ((maximum.(map length)) cs - (length c)) r)) cs
  12.                 fix cs = map (\c -> samelength c ' ') $ samelength cs ""
  13.         content <- readall (words files) []
  14.         putStrLn $ unlines.(map unwords).transpose.fix.(map lines) $ content
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement