From 0bfe07508bd60cef9edcc249fe24d7d6a96492c8 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Sun, 5 Oct 2025 00:38:37 +0200 Subject: add fourth exercise of lecture 8 --- lec08/Party.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lec08') 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 -- cgit v1.2.3