Mercurial > 12ws.info2
comparison exercises/src/Exercise_14.hs @ 35:782323a762a2
week 14
author | Markus Kaiser <markus.kaiser@in.tum.de> |
---|---|
date | Wed, 30 Jan 2013 22:08:04 +0100 |
parents | |
children | 89feab98266f |
comparison
equal
deleted
inserted
replaced
34:f62e3ed2c90d | 35:782323a762a2 |
---|---|
1 module Exercise_14 where | |
2 import qualified Data.List | |
3 | |
4 | |
5 {---------------------------------------------------------------------} | |
6 {- Aufgabe G14.1 -} | |
7 | |
8 delete :: Eq a => a -> [a] -> [a] | |
9 delete = Data.List.delete {- falsche Implementierung -} | |
10 | |
11 | |
12 | |
13 {---------------------------------------------------------------------} | |
14 {- Aufgabe G14.1 -} | |
15 | |
16 concat'' :: [[a]] -> [a] | |
17 concat'' = undefined | |
18 | |
19 | |
20 | |
21 {---------------------------------------------------------------------} | |
22 {- Aufgabe G14.1 -} | |
23 | |
24 {- | |
25 | |
26 map (*2) (1 : threes) !! 1 | |
27 | |
28 (\f -> \x -> x + f 2) (\y -> y * 2) (3 + 1) | |
29 | |
30 filter (/=3) threes | |
31 | |
32 -} | |
33 | |
34 | |
35 | |
36 {---------------------------------------------------------------------} | |
37 {- Aufgabe H14.1 -} | |
38 | |
39 {- Type me! -} | |
40 | |
41 | |
42 | |
43 {---------------------------------------------------------------------} | |
44 {- Aufgabe H14.2 -} | |
45 | |
46 {- Proof me! -} | |
47 | |
48 | |
49 | |
50 {---------------------------------------------------------------------} | |
51 {- Aufgabe H14.3 -} | |
52 | |
53 filterMap :: (a -> Maybe b) -> [a] -> [b] | |
54 filterMap = undefined |