From 057e8bf56f3aba60cca2ef940cbb73cb5e4678e2 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sat, 9 Oct 2021 15:57:03 +0200 Subject: Add pre assignments for lec5 pp --- sem7/pp/lec5.hs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sem7/pp/lec5.hs (limited to 'sem7/pp') 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 -- cgit v1.2.3