Chiasmus is a mechanic often used in joke punchlines. For instance:

Q: What's the difference between a teacher and a conductor?
A: One teaches you to train the mind, the other to mind the train.