module Template_05(biLookupIte, biLookupGuarded, large, largeFast, factorial, euler, factorialListNaive, factorialList, eulerList, eulerConvergence) where -- IMPORTANT ----------------------------- doNotModify anything above this line = True -- Exercise 1 biLookupIte :: Either a b -> [(a, b)] -> Maybe (Either a b) biLookupIte _ _ = undefined biLookupGuarded :: Either a b -> [(a, b)] -> Maybe (Either a b) biLookupGuarded _ _ = undefined large :: Integer -> Integer large n | n <= 2 = 3 * n - 5 | otherwise = 2 * large (n - 3) + 5 * large (n - 1) + 7 largeFast :: Integer -> Integer largeFast n = undefined -- Exercise 2 factorial :: Integer -> Integer factorial 0 = 1 factorial n = n * factorial (n-1) euler :: Integer -> Double euler = undefined factorialListNaive :: Integer -> [Integer] factorialListNaive n | n == 0 = [1] | otherwise = factorial n : factorialListNaive (n-1) factorialList :: Integer -> [Integer] factorialList = undefined eulerList :: Integer -> Double eulerList n = eulerListAux (factorialList n) where eulerListAux = undefined eulerConvergence :: [Double] eulerConvergence = undefined