Created
November 25, 2017 08:41
-
-
Save mizukmb/e4bfebaddb40c3805c73d0dc888251ae 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 | |
-- main = putStrLn "Hello, World" | |
-- main = do | |
-- putStrLn "Hello, what's your name?" | |
-- name <- getLine | |
-- putStrLn ("Hey " ++ name ++ ", you rock!") | |
main = do | |
putStrLn "What's your first name?" | |
firstName <- getLine -- <- は IO アクションを束縛する際に使う | |
putStrLn "What's your last name?" | |
lastName <- getLine | |
-- let は純粋な式を名前に束縛する際に使う | |
let bigFirstName = map toUpper firstName | |
bigLastName = map toUpper lastName | |
putStrLn $ "hey " ++ bigFirstName ++ " " | |
++ bigLastName ++ " " | |
++ ", how are you?" |
Author
mizukmb
commented
Nov 25, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment