We have a non-empty list `Publisher` storing publisher names sorted alphabetically. This results in duplicates. The following procedure attempts to extract the unique list of publishers while preserving sorted order. Identify all mistakes, if any.
```
uniqueList = [first(Publisher)]
prev = last(Publisher)
for each x in rest(Publisher) {
if (x != prev) {
uniqueList = uniqueList ++ x
}
prev = x
}
```