今日もあやはお休み
ひきつづき
module Sample where
-
- タプル
func11 = (1,2)
func12 = (1,2,3,4,5)
func13 n (a,b,c,d,e) = case n of
0->a
1->b
2->c
3->d
5->e
-
- 型
func14 :: Int -> Int -> Int
func14 x y = x * y
-
- 引数の減った関数
- func14 1 2
- (func14 1) 2
ひきつづき
module Sample where
func11 = (1,2)
func12 = (1,2,3,4,5)
func13 n (a,b,c,d,e) = case n of
0->a
1->b
2->c
3->d
5->e
func14 :: Int -> Int -> Int
func14 x y = x * y