module Glob where -- Implement each of the following functions: f1 :: a -> b -> a f1 = undefined f2 :: a -> (a -> b) -> b f2 = undefined f3 :: a -> a -> (a -> b) -> b f3 = undefined f4 :: a -> b f4 = undefined -- The types of some other functions we'll use. -- -- sum :: [Int] -> Int -- map :: (a -> b) -> [a] -> [b] -- filter :: (a -> Bool) -> [a] -> [a] -- | A mystery function. We only know its type. -- * What can it potentially do? -- * What can it definitely not do? glob :: [a] -> [a] glob = undefined -- Which of the following theorems are true? -- -- sum . glob <=> glob . sum -- map f . glob <=> glob . map f -- filter f . glob <=> glob . filter f