Skip to content

Commit c8993dd

Browse files
committed
[exercise] 3.2
1 parent 8e7d75e commit c8993dd

File tree

1 file changed

+14
-0
lines changed
  • chapter03-Types-and-classes

1 file changed

+14
-0
lines changed

chapter03-Types-and-classes/2.hs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
bools :: [Bool]
2+
bools = [True, False]
3+
4+
nums :: [[Int]]
5+
nums = [[1], [2, 3]]
6+
7+
add :: Int -> Int -> Int -> Int
8+
add x y z = x + y + z
9+
10+
copy :: a -> (a, a)
11+
copy x = (x, x)
12+
13+
apply :: (a -> b) -> a -> b
14+
apply f x = f x

0 commit comments

Comments
 (0)