summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdoardo La Greca2025-10-05 00:38:37 +0200
committerEdoardo La Greca2025-10-05 00:38:37 +0200
commit0bfe07508bd60cef9edcc249fe24d7d6a96492c8 (patch)
treed4977dc86a646b200714428d21242158305206c5
parent339fc22690a5dfc419b3d6e19a5cc377ee51dbbb (diff)
add fourth exercise of lecture 8
-rw-r--r--lec08/Party.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/lec08/Party.hs b/lec08/Party.hs
index 7163eaf..744d3e4 100644
--- a/lec08/Party.hs
+++ b/lec08/Party.hs
@@ -67,3 +67,8 @@ nextLevel boss outcomes = (bestWith, bestWithout)
where
bestWith = glCons boss $ mconcat $ map snd outcomes
bestWithout = mconcat $ map (uncurry max) outcomes
+
+-- Exercise 4
+
+maxFun :: Tree Employee -> GuestList
+maxFun hierarchy = maximum $ treeFold nextLevel hierarchy