While this code is correct, `erase(unique(...))` doesn't intuitively make much sense.  Worth a comment as to why this actually works.