From 65df75188219ab115c290e37199b8e46e115c70a Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Fri, 26 Dec 2014 15:38:12 +0530 Subject: [PATCH] exercise 4 --- hw8/Party.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw8/Party.hs b/hw8/Party.hs index d303b01..3bc5e1b 100644 --- a/hw8/Party.hs +++ b/hw8/Party.hs @@ -51,3 +51,12 @@ nextLevel e lst = withoutBoss = mconcat $ map (uncurry moreFun) lst in (withBoss, withoutBoss) + +-- exercise 4 +-- maxFun +maxFun :: Tree Employee -> GuestList +maxFun = uncurry moreFun . maxFunPair + +maxFunPair :: Tree Employee -> (GuestList, GuestList) +maxFunPair (Node e es) = nextLevel e $ map maxFunPair es + -- 2.37.2