Created
April 15, 2015 12:05
-
-
Save shigemk2/eb452c40c180ee445958 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
main = do | |
foo <- putStrLn "Hello, what's your name?" | |
name <- getLine | |
-- 1 | |
-- こういう書き方は出来ないなぜなら戻り値I/Oを返さないといけないから | |
-- _ <- putStrLn ("Hey " ++ name ++ ", you rock!") | |
-- 2 | |
x <- putStrLn ("Hey " ++ name ++ ", you rock!") | |
return x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment