We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5371e56 commit e7b9f86Copy full SHA for e7b9f86
ch03/32.hs
@@ -0,0 +1,21 @@
1
+{-
2
+ - Write down definitions that have the following types;
3
+ - it does not matter what the definitions actually do
4
+ - as long as they are type correct.
5
+ -
6
+ - bools :: [Bool]
7
+ - nums :: [[Int]]
8
+ - add :: Int -> Int -> Int -> Int
9
+ - copy :: a -> (a,a)
10
+ - apply :: (a -> b) -> a -> b
11
+ -}
12
+
13
+bools = [False, True]
14
15
+nums = [[1 :: Int, 2 :: Int]]
16
17
+add x y z = (x :: Int) + (y :: Int) + (z :: Int)
18
19
+copy a = (a, a)
20
21
+apply a b = a(b)
0 commit comments