I am pretty new to Haskell and am having trouble with this function.
The function gets an Int and a list of tuples and has to return Bool if the Int exists in the list.
When I try to compile it , it doesn't return any errors , but when I try to test it, I get Non-exhaustive patterns in function kommt_vor
--help func to turn list of tuples into a list
tupleToList :: [(Int,Int)] -> [Int]
tupleToList ((a,b):xs) = a : b : tupleToList xs
tupleToList _ = []
kommt_vor :: Int -> [(Int,Int)] -> Bool
kommt_vor xs [(a,b)] = xs `elem` tupleToList[(a,b)]
kommt_vor xs [] = False
Any help would be great