 myMaximumBy takes a comparison function and a list and returns the
-- greatest element of the list based on the last value that the comparison
-- returned GT for.
myMaximumBy :: (a -> a -> Ordering) -> [a] -> a
myMaximumBy f (x:xs) = foldr (\x y -> case f x y of
                                        LT -> y
                                        _ -> x) x xs
-- 11
myMaximumBy :: (a -> a -> Ordering) -> [a] -> a
myMaximumBy f (x:xs) = foldr (\x y -> case f x y of
                                        LT -> y
                                        _ -> x) x xs
myMaximumBy f (x:xs) = foldr (\x y -> case f x y of
                                        LT -> y
                                        _ -> x) x xs