一応書いたからのせときます
import Control.Applicative ((<$>)) import Control.Monad (replicateM, mapM_) import System.Environment (getArgs) n :: Int n = 5 main = puts $$ argf_each .$ take n argf_each :: IO [String] argf_each = getArgs >>= f where f [] = replicateM (n + 1) getLine f xs = concatMap lines <$> mapM readFile xs puts = mapM_ putStrLn infixl 9 .$ (.$) = flip (<$>) infixl 8 $$ ($$) = (=<<)