Write and test the definition of a haskell function 'largest', which finds the largest element of a list, but is implemented using higher-order functions and/or operator sections as appropriate.
largest :: [a] -> (a -> a -> Ordering) -> a largest (x:xs) cmp = go x xs where go largest [] = largest go largest (x:xs) = case cmp largest x of LT -> go x xs _ -> go largest xs