diff options
| author | Edoardo La Greca | 2025-10-05 00:38:37 +0200 |
|---|---|---|
| committer | Edoardo La Greca | 2025-10-05 00:38:37 +0200 |
| commit | 0bfe07508bd60cef9edcc249fe24d7d6a96492c8 (patch) | |
| tree | d4977dc86a646b200714428d21242158305206c5 /lec08/Party.hs | |
| parent | 339fc22690a5dfc419b3d6e19a5cc377ee51dbbb (diff) | |
add fourth exercise of lecture 8
Diffstat (limited to 'lec08/Party.hs')
| -rw-r--r-- | lec08/Party.hs | 5 |
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 |