Im trying to figure out how to create a new list that has only the elements that occur only once. I can't use recursion either.
This is a small part of a bigger function. Im trying to write a function to get the Intersect of two sets. Basically i combined the sets. Then sorted. Then i want to combine that with set B and get rid of all the duplicates in that set. Unless someone else knows an easier way.
I can use high order functions, but i can't use recursion.
Thanks
Edit: Example:
[1,2,3,3,4,4,5,5] Should come out as [1,2]