-- | Exercise 1 template. -- Instructions. -- 1. Write your solutions to the exercise in this file. You -- may add extra functions in this file to implement your solution. -- -- 2. Do NOT change the type or name of any of the template functions. -- -- 3. Do NOT change the name of this file. -- -- 4. Do NOT change the module name of this file. -- -- 5. To submit this to GradeScope, submit ONLY this file. -- -- 6. Have lots of fun :) module Ex1 where -- This includes the required types for this assignment (namely, the 'SF' type). import Ex1Types -- This imports some standard library functions for you to use. import Prelude (Int, Float, Integer, Eq, Ord, Bool (..), String, otherwise, abs, (+), (-), subtract, (*), (/), (==), (/=), (<), (<=), (>), (>=), (||), (&&), rem, mod, div, quot, max, min, fromIntegral, undefined, error, show) -- This includes helpful functions for debugging. import Debug.Trace -- | Q1. avgThree :: Int -> Int -> Int -> Float avgThree = undefined -- | Q2. maxThree :: Int -> Int -> Int -> (Int, Int) maxThree = undefined -- | Q3. invExp :: Integer -> SF Integer invExp = undefined -- | Q4. myLcm :: Int -> Int -> Int myLcm = undefined -- | Q5. binom :: Integer -> Integer -> Integer binom = undefined -- | Q6. grow :: String -> String grow = undefined -- | Q7. instrictorder :: [Int] -> Bool instrictorder = undefined -- | Q8. expensive :: [(String, Int)] -> Int -> [String] expensive = undefined -- | Q9. sortCheapest :: [(String, Int)] -> [(String, Int)] sortCheapest = undefined -- | Q10. divisors :: Integer -> [Integer] divisors = undefined -- | Q11. substring :: String -> String -> Bool substring = undefined -- | Q12. sublists :: [a] -> [[a]] sublists = undefined