Advertisement
Guest User

Untitled

a guest
Jul 10th, 2011
973
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # one liner udgave:
  2.  
  3. 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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement