blob: 87c9b8aaea655850d3cd1ea39824387d03f87e60 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
module NotatieFuncties
import StdEnv
f1 :: Int
f1 = 1 + 5
f2 :: Int
f2 = (+) 1 5
f3 :: Int Int -> Int
f3 m n
| m < n = m
| otherwise = n
f4 :: String Int -> String
f4 s n
| n <= 0 = ""
| otherwise = s +++ f4 s (n-1)
f5 :: Int Int -> Int
f5 x 0 = x
f5 x y = f5 y (x rem y)
f6 :: (Int,Int) -> Int
f6 x = fst x + snd x
f7 :: (a,b) -> (b,a)
f7 (a,b) = (b,a)
f8 :: (a,a) -> (a,a)
f8 x = f7 (f7 x)
Start = f1
|