{- Exercise 3.1 -} -- 3.1.1 {- Drop as many parentheses as possible in: ((f (g (3) (h 5 7)) 10) !! (((y - 7) > (5 || x)))) -} -- 3.1.2 {- Drop as many parentheses as possible in: ((1 >>= (2 >> f (x && y))) . (((y ++ True) : 'a'))) -} -- 3.1.3 {- Drop as many parentheses as possible in: (((3 > 2) == ((3 ^ 5) < 42)) >>= (h && (x == y))) -} {- Exercise 3.2 -} import Prelude hiding (even, odd) -- 3.2.1 evenNat :: Integer -> Bool evenNat n = undefined -- 3.2.2 even :: Integer -> Bool even n = undefined -- 3.2.3 odd :: Integer -> Bool odd n = undefined {- Exercise 3.3 -} -- 3.3.1 data Color severity :: Color -> Integer severity = undefined -- 3.3.2 data District colorOf :: District -> Color colorOf = undefined -- 3.3.3 moreSever :: District -> District -> Bool moreSever = undefined