Page 200 -
P. 200

duplicated code to remove duplication?














                                                 “Not too bad”...you’re kidding, right?!?
                                                  Surely there’s something that can be done
                                                  with all that duplicated duplicate code?











                                                   The irony is hard to avoid, isn’t it?
                                                   The code that removes duplicates from your lists is itself
                                                   duplicated.
                                                   Sometimes such a situation is unavoidable, and sometimes
                                                   creating a small function to factor out the duplicated code can
                                                   help. But something still doesn’t feel quite right here…

































           164    Chapter 5
   195   196   197   198   199   200   201   202   203   204   205