-- Main program to reverse each line of input

module Main where

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

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

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