scala - List of first occurrences in original order -


suppose have x: list[a]. elegant way of building y: list[a] such y contains first occurrence of each element of x, in same order? interested in case a=int if there general solution, better.

as correctly suggested twillouer, use .distinct method. guarantees preserve order expect.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -