aboutsummaryrefslogtreecommitdiff
path: root/sem7/pp/lec5.hs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-10-09 15:57:03 +0200
committerJulian T <julian@jtle.dk>2021-10-09 15:57:03 +0200
commit057e8bf56f3aba60cca2ef940cbb73cb5e4678e2 (patch)
treeeccd9b4414d7b3b3b907a443c75337820a10a57c /sem7/pp/lec5.hs
parenta0b956c465d7297d185d362bc5f774daeecf3f39 (diff)
Add pre assignments for lec5 pp
Diffstat (limited to 'sem7/pp/lec5.hs')
-rw-r--r--sem7/pp/lec5.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/sem7/pp/lec5.hs b/sem7/pp/lec5.hs
new file mode 100644
index 0000000..246c85a
--- /dev/null
+++ b/sem7/pp/lec5.hs
@@ -0,0 +1,9 @@
+
+-- Opgaver før lecture
+sum' 0 = 0
+sum' x = x + sum' (x-1)
+
+flip' = map (\(x, y) -> (y, x))
+-- Here i would guess that the type is [(a, b)] -> [(b, a)]
+-- When quering i get flip' :: [(b, a)] -> [(a, b)]
+-- Yeah they are the same