import System.Environment (getArgs) import qualified System.IO.Lazy.Input as LI import qualified System.IO.Strict as SIO import Data.Char main = LI.run' . (fmap (SIO.putStr . fmap swapCase) . LI.concat . map LI.readFile) =<< getArgs where swapCase c | isUpper c = toLower c | otherwise = toUpper c