Hi all,
I have a function like this:
selectValue1 :: Int -> [(Int,Int)] -> [Int]
selectValue1 a [(x,y)]= [ y |(x,y)<-[(x,y)],x<-(x,y),x==a ]
what i want to do is to pass a tuple list to the function and take the second item in the tuple if the first item in the tuple matches with the input a.But this function give me an error:
Type error in generator
*** Term : (x,y)
*** Type : (Int,Int)
*** Does not match : [a]
why this happens??How can do the above task?? Any solutions?? Thank you all..:)