Changes in hh2008/naoya_t/trunk/test.hs [22:18]
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
hh2008/naoya_t/trunk/test.hs
r22 r18 1 "Hello, World!" 2 putStrLn "Hello, World!" 3 5 * 6 - 7 4 print $ 5 * 6 - 7 5 \x -> x * x $ 5 * 6 - 7 6 print $ \x -> x * x $ 5 * 6 - 7 7 [1,2,3,4] 8 print [1,2,3,4] 9 tail [1,2,3] 10 print $ tail [1,2,3] 1 main = putStrLn "Hello, World!" 11 2 12 print if 1 then '@' else '*' 13 -- if c == '\t' then '@' else c 14 \num -> num * num 15 \x -> x 16 3 + 4 17 4 * 5 - 1 3 -- main = do { cs <- getContents ; print $ length $ lines cs } 18 4 19 5 firstNLines n cs = unlines $ take n $ lines cs 20 6 21 f1 = do { cs <- getContents ; print $ length $ lines cs } 22 f2 = print $ 5 + 2 * 5 23 f3 = print $ tail [1,2,3] 24 f4 = tail [1,2,3] 7 -- main = print $ 5 + 2 * 5 8 rmain = print $ tail [1,2,3] 9 -- main = tail [1,2,3] 10 11 tail [1,2,3] 12 print [1,2,3,4] 25 13 26 14 fib 0 = 0 … … 28 16 fib n = fib (n-1) + fib (n-2) 29 17 30 square n = n * n31 triple a = a + a + a32 33 main = putStrLn "Hello, World!"34 35 main = print $ 5 * 6 - 736 -- main = print $ \x -> x * x $ 5 * 6 - 7