# list manipulation [duplicate]

This question already has an answer here:

I have a list like the following:

 {{1, 3}, {2, 5}, {3, 6}, {2, 4}}


I want the final list to be like that :

{{1, 3}, {2, 5}, {3, 6}}.


Here the first element of the sub list is needs to check with other sub list's first element and remove the sub list where first element repeated again.

So the final list doesn't have {2,4} because 2 is repeated twice.

-

## marked as duplicate by Simon Woods, Sjoerd C. de Vries, m_goldberg, Oleksandr R., Michael E2Jun 25 '13 at 18:11

look here, similar one + sorting: mathematica.stackexchange.com/questions/27274/… – Kuba Jun 25 '13 at 9:04
@Mr.Wizard Why has my flag counter been reset??? – Artes Jun 25 '13 at 22:08
@Artes Now that you mention it, I see that its totally gone from my profile page. – Sjoerd C. de Vries Jun 25 '13 at 22:20
Closely related: mathematica.stackexchange.com/q/6279/121 – Mr.Wizard Jun 25 '13 at 22:25
@Artes The flagging system is undergoing some major overhaul (esp. in the backend... not sure how much of it we'd actually see). Some of those involve what flags actually reach the mods and what should be left to the community to decide (e.g. off-topic flags). So such counter resets might occur temporarily as they make changes. Don't worry, they're only temporary caching effects and not permanent (cc @Sjoerd) – R. M. Jun 26 '13 at 17:44

You can use many functions, but the most straightforward approach uses DeleteDuplicates with a test function:
DeleteDuplicates[ {{1, 3}, {2, 5}, {3, 6}, {2, 4}}, First @ #1 == First @ #2 &]

{{1, 3}, {2, 5}, {3, 6}}