I am using Intermediate Student with Lambda in DrRacket, I was wondering how one would remove the duplicates in a list, while keeping the order. For example (remo
I'm not sure if this is homework, but in case it is I'll post just the idea. If it's not tell me and I can put a solution here.
What you need is to keep track of the unique items you find, you can do that by using an auxiliary list, like an accumulator, to keep track of the ones you found so far.
Whenever you look at another item check to see if it's in the auxiliary list. In case it's not add it to the auxiliary list.
You'll end up with a reverse order of what you're trying to find, so you can just (reverse ...) it and you'll have your answer.