The repetition of two terms, but in the opposite order, is an antimetabole. It’s a common device in poetry and prose, emphasizing that a contrast or a comparison applies in both directions, and pleasing in its symmetry. Here are some examples in poetry, from Shakespeare’s sonnets:
Music to hear, why hear’st thou music sadly? [8.1]
But day by night and night by day oppressed. [28.4]
Increasing store with loss, and loss with store. [64.8]
Applying fears to hopes, and hopes to fears, [119.3]
Is lust in action, and till action, lust [129.2]
All this the world well knows yet none knows well, [129.15]
From Milton’s Paradise Lost:
Can make a Heav’n of Hell, a Hell of Heav’n. [1.255]
Of fierce extreams, extreams by change more fierce, [2.599]
Both all things vain, and all who in vain things [3.448]
The Hell within him, for within him Hell [4.20]
So farwel Hope, and with Hope farwel Fear, [4.108]
Left to his own free Will, his Will though free, [5.236]
And Earth be chang’d to Heavn, & Heav’n to Earth, [7.160]
From Browning’s The Ring and the Book:
One calls the square round, t’other the round square— [4.36]
Hell in life here, hereafter life in hell: [4.252]
Letters from wife to priest, from priest to wife,— [4.1033]
I knew the knave, the knave knew me. And thus [6.1106]
To live, and see her learn, and learn by her, [6.2056]
Show best was worst and worst would have been best. [8.432]
And make amends,—be there amends to make! [10.1921]
The question asks about other terms for repetition. Here are a few, with examples from Shakespeare:
- Anadiplosis is the repetition of the last word or phrase of the preceding clause at the start of the next. (“To die, to sleep. To sleep, perchance to dream”)
- Antanaclasis is the repetition of a word in a different sense. (“Put out the light, and then put out the light”)
- Epistrophe is the repetition of a word at the end of successive clauses. (“Hourly joys be still upon you! Juno sings her blessings on you.”)
- Diacope is a repetition with one or a few intervening words. (“I am dying, Egypt, dying”)
- Epanadiplosis is the repetition of the first word or words of a clause at the end. (“The King of England, when we know the King.”)
- Epizeuxis is the repetition of a single word. (“O wonderful, wonderful, most wonderful wonderful”)
- Polyptoton is the use of different words deriving from the same root. (“With eager feeding food doth choke the feeder”)
- Polysyndeton is the repetition of conjunctions. (“If I dare eat, or drink, or breathe, or live”)