hello, I'm new to haskell, I'm studying for an exam, and I'm having trouble with this exercise.
I have a list of Integers, and I want to return the highest value of all.
i have this:
comp :: Int -> Int -> Int
comp x y | x < y = y
| otherwise = x
maxList :: [Int] -> [Int]
maxList (x1:x2:xs) = comp x1 x2 : maxList xs
maxList [] = []
this code returns a list, but I only want it to return a single Int... but can't seem to do it, could you please help me?