FYI, you can exchange the first and second elements of a tuple by calling `swap()` on it.  I just discovered this recently.