Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created June 24, 2015 11:39
Show Gist options
  • Save shigemk2/2fcb11020669ca841a7f to your computer and use it in GitHub Desktop.
Save shigemk2/2fcb11020669ca841a7f to your computer and use it in GitHub Desktop.
main = do line <- fmap reverse getLine
putStrLn $ "You said " ++ line ++ " backwards!"
putStrLn $ "Yes, you really said " ++ line ++ " backwards!"
main = do line <- getLine
let line' = reverse line
putStrLn $ "You said " ++ line' ++ " backwards!"
putStrLn $ "Yes, you said " ++ line' ++ " backwards!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment