Shows the use of a custom hook to factor out the common code
when handling cities
and selCities
.
Assuming that we would like the invariant selCities
⊆ cities
to be true, then we have a bug:
If a city like Chicago is added to Selected Cities and then removed from the list of cities
using
Do Remove, then it is impossible to remove from
Selected Cities without adding it back to cities
using Do Add.