Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created April 15, 2015 12:05
Show Gist options
  • Save shigemk2/eb452c40c180ee445958 to your computer and use it in GitHub Desktop.
Save shigemk2/eb452c40c180ee445958 to your computer and use it in GitHub Desktop.
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