So i'm having problems with some variable types.
getOrdenado :: (String,Int,String,Int,Int) -> Int
getOrdenado (_,_,_,a,_) = a
listaOrdenado :: [(String,Int,String,Int,Int)] -> [Int]
listaOrdenado xs = map getOrdenado xs
getOrdenado takes a certain Int value from a tuple contained in a list of tuples and listaOrdenado makes a list of all of thoose specific Int's.
This function is supposed to work on the following list:
firma = [("Ana", 30, "RH", 1500, 3), ("Rui", 40, "Vendas", 1000, 2),
("Luis", 45, "RH", 3333, 5), ("Maria", 55, "Admin", 2000, 4)]
But whenever i try running listaOrdenado with this list i get the following error
Couldn't match type `Integer' with `Int'
Expected type: [(String, Int, String, Int, Int)]
Actual type: [([Char], Integer, [Char], Integer, Integer)]
In the first argument of `listaOrdenado', namely `firma'
In the expression: listaOrdenado firma
In an equation for `it': it = listaOrdenado firma
I am not allowed to use Integer in the class signature, only Int so i have no clue on how to solve this, nor do i have any clue why it says that those values in firma are Integer's