Created
April 29, 2012 15:13
-
-
Save miaout17/2551099 to your computer and use it in GitHub Desktop.
This file contains 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
import Data.Char (toUpper) | |
import Control.Monad (liftM) | |
upper = map toUpper | |
main = do | |
putStrLn "Please enter your name: " | |
name <- liftM upper getLine | |
putStrLn $ "Hello " ++ name ++ " with liftM!" | |
putStrLn "Please enter your name again: " | |
name2 <- fmap upper getLine | |
putStrLn $ "Hello " ++ name2 ++ " with liftM!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment