Correctly handle the presence of both an element and its toggle in the input, and handle them base on order, e.g. toggle_set(['x', 'y', '~x']) --> {'y', '~x'} toggle_set(['~x', 'y', 'x']) --> {'y', 'x'}