-- Main program to reverse each line of input

module Main where

{-
   unlines :: [String] -> String ; combines separate lines into one string
   reverse :: [a] -> [a]         ; reverse list back to front
   lines   :: String -> [String] ; breaks input into separate lines
   map ; apply function to every item in sequence
-}

main :: IO()
main = interact (unlines . map reverse . lines)

--   ------------For GNU Emacs ------------
--  Local Variables:
--  compile-command: "ghc -Wall reverse.hs"
--  End: