7
|
1 module Exercise_4 where |
|
2 import Test.QuickCheck |
|
3 import Data.List |
|
4 |
|
5 {---------------------------------------------------------------------} |
|
6 {- Aufgabe G4.1 -} |
|
7 |
|
8 hasFibonacciProperty :: [Integer] -> Bool |
|
9 hasFibonacciProperty xs = undefined |
|
10 |
|
11 |
|
12 |
|
13 {---------------------------------------------------------------------} |
|
14 {- Aufgabe G4.2 -} |
8
|
15 key = [('a','x'),('H','e'),('l','P'),('o','M')] |
7
|
16 |
|
17 cryptChar :: [(Char,Char)] -> Char -> Char |
|
18 cryptChar [] c = '_' |
|
19 cryptChar ((k,v) : ks) c = undefined |
|
20 |
|
21 |
|
22 crypt :: [(Char,Char)] -> [Char] -> [Char] |
|
23 crypt key [] = [] |
|
24 crypt key (x : xs) = undefined |
|
25 |
|
26 |
|
27 isKeyReversible :: [(Char,Char)] -> Bool |
|
28 isKeyReversible [] = True |
|
29 isKeyReversible ((k,v) : ks) = undefined |
|
30 |
|
31 {- QuickCheck Tests -} |
|
32 |
|
33 |
|
34 |
|
35 {---------------------------------------------------------------------} |
|
36 {- Aufgabe G4.3 -} |
|
37 |
|
38 {- |
|
39 - Proof me! |
|
40 -} |
|
41 |
|
42 |
|
43 |
|
44 {---------------------------------------------------------------------} |
|
45 {- Aufgabe G4.4 -} |
|
46 |
|
47 match :: [Char] -> [Char] -> Bool |
|
48 match xs ys = undefined |
|
49 |
|
50 |
|
51 |
|
52 {---------------------------------------------------------------------} |
|
53 {- Aufgabe H4.1 -} |
|
54 |
|
55 strictlyDescending :: [Integer] -> Bool |
|
56 strictlyDescending = undefined |
|
57 |
|
58 |
|
59 |
|
60 {---------------------------------------------------------------------} |
|
61 {- Aufgabe H4.2 -} |
|
62 |
|
63 chunks :: Int -> [a] -> [[a]] |
|
64 chunks = undefined |
|
65 |
|
66 irregularChunks :: [Int] -> [a] -> [[a]] |
|
67 irregularChunks = undefined |
|
68 |
|
69 |
|
70 |
|
71 {---------------------------------------------------------------------} |
|
72 {- Aufgabe H4.3 -} |
|
73 |
|
74 {-WETT-} |
|
75 upsAndDowns :: Ord a => [a] -> [[a]] |
|
76 upsAndDowns = undefined |
|
77 {-TTEW-} |
|
78 |
|
79 |
|
80 |
|
81 {---------------------------------------------------------------------} |
|
82 {- Aufgabe H4.4 -} |
|
83 |
|
84 {- |
|
85 - <Hier Induktionsbeweis einfügen> |
|
86 -} |