• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂109cd5029a3aa16a15098a1bb0184f89ffbd6803 (tree)
時間2010-09-08 22:33:11
作者lorenzo
Commiterlorenzo

Log Message

I expanded a tiny bit the hello world example.

Change Summary

差異

diff -r 3297201532ce -r 109cd5029a3a haskell/hello.hs
--- a/haskell/hello.hs Tue Sep 07 16:51:51 2010 +0000
+++ b/haskell/hello.hs Wed Sep 08 13:33:11 2010 +0000
@@ -1,3 +1,6 @@
1+import Data.Char
2+
3+
14 main = do
25 putStrLn "Hello, what's your name?"
36 name <- getLine
@@ -8,3 +11,21 @@
811 -- name <- getLine
912 -- putStrLn $ "Read this carefully, because this is your future: " ++ tellFortune name
1013
14+
15+-- main_bis = do
16+ putStrLn "What's your first name?"
17+ firstName <- getLine
18+ putStrLn "What's your last name?"
19+ lastName <- getLine
20+ let bigFirstName = map toUpper firstName
21+ bigLastName = map toUpper lastName
22+ putStrLn $ "hey " ++ bigFirstName ++ " " ++ bigLastName ++ ", how are you?"
23+
24+-- f :: [String] -> [Int]
25+-- f = map read
26+
27+
28+-- c = f(["1","2"])
29+
30+-- let f putStrLn c
31+-- print f
\ No newline at end of file