I tried to extract the first element of a tuple in a list of tuples in haskell via list comprehension but somehow it just outputs the first one and then stops, so I decided to do it via recursion which looked like this:
tuples :: (Ord a, Ord b) => [(a, b)] -> [a]
tuples [] = []
tuples ((x,y):xs) = x : tuples xs
Now, while this works I would like to know how to do the same thing via list comprehension.