Re: [racket-users] Re: Searching diffrences in two lists
It might also be a good move to read this: http://www.catb.org/esr/faqs/smart-questions.html#intro On Wed, Jun 28, 2017 at 12:21 PM, Glenn Hoetkerwrote: > If order doesn't matter and it would be okay for duplicates *within* a > list to be deleted, you might make use of > > * Lists can be converted to sets, via list->set and back again > * There are many set methods to yield unions, intersections and > differences between sets. See https://docs.racket-lang.org/ > reference/sets.html. > > That should be a good start. Follow up if you get stuck. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Re: Searching diffrences in two lists
If order doesn't matter and it would be okay for duplicates *within* a list to be deleted, you might make use of * Lists can be converted to sets, via list->set and back again * There are many set methods to yield unions, intersections and differences between sets. See https://docs.racket-lang.org/reference/sets.html. That should be a good start. Follow up if you get stuck. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Re: Searching diffrences in two lists
Consider using the following function https://docs.racket-lang.org/reference/pairs.html?q=memq#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._memq%29%29 It's helpful to sketch out the general steps you'd need to be able to carry out the procedure to solve the problem. My quick sketch would look like the following: Since you are checking to see if an element in the first list is also in the second list, you'd need to be able to take one element from the first list and check to see if it is a member of the second list, then repeat again for each of the remaining first list's elements. How would you code the above procedure? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.