module Main where

import Data.Foldable      (forM_)
import System.Environment (getArgs)

-- cat
main :: IO()
main = do
  -- Get a list of args
  args <- getArgs
  -- read the named files
  fileContents <- mapM readFile args
  -- print the files contents
  forM_ fileContents putStrLn

 cat
 Get a list of args
 read the named files
 print the files contents
module Main where

import Data.Foldable      (forM_)
import System.Environment (getArgs)

main :: IO()
main = do
  args <- getArgs
  fileContents <- mapM readFile args
  forM_ fileContents putStrLn
