Say you have a sequence like:
... and you want a sequence containing all the unique items (remove duplicates) like:
Here is a function to do it:
or a one-liner:
update: in the comments below, some other ways were suggested..
with 'set'.. like this:
or with a dictionary.. like this:
Copyright © 2006-2008 Corey Goldberg
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.