Re: [racket-users] Removing duplicates from a list while still maintaining order in Dr. Racket.

2020-07-20 Thread David Storrs
"double post", not "dinner post". Damn. Email needs an edit function and no autocorrect. On Mon, Jul 20, 2020, 1:09 PM David Storrs wrote: > First off, if this was an intentional dinner post, well played. :> > > > If you don't want to use built-in functions, I would look at using a hash > to

Re: [racket-users] Removing duplicates from a list while still maintaining order in Dr. Racket.

2020-07-20 Thread David Storrs
First off, if this was an intentional dinner post, well played. :> If you don't want to use built-in functions, I would look at using a hash to track what you've already seen and then cons things together depending on if they're in the hash. For the second, maybe recur through the list using a

[racket-users] Removing duplicates from a list while still maintaining order in Dr. Racket.

2020-07-20 Thread JJ C
In Beginning Student with List Abbreviations I am struggling to come up with functions to remove duplicates from a list while maintaining the order of the list. one function to remove duplicates from the left, i.e. 1 2 1 3 2 4 5 -> 1 2 3 4 5 and one from the right. i.e. 1 2 1 3 2 4 5 -> 1