Created
February 28, 2015 05:27
-
-
Save MiyamonY/aa6717a4794e66753e52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- instance Functor IO where | |
-- fmap f action = do | |
-- result <- action | |
-- return (f result) | |
main :: IO () | |
-- main = do line <- getLine | |
-- let line' = reverse line | |
-- putStrLn $ "You said " ++ line' ++ " backwards!" | |
-- putStrLn $ "Yes, you said " ++ line' ++ " backwards" | |
main = do line <- fmap reverse getLine | |
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