Being able to remove duplicate values from lists is great. The problem with this approach is that you have to remove duplicates every time that you run a side-effect. This is wasteful for two reasons:
- You're storing values that aren't used for anything
- You have to spend valuable CPU cycles to get rid of them
To counter these issues, you can just use ordered sets instead of lists to prevent duplicates from ever appearing in the first place.