How does "Extreme Programming" (XP) fit with patterns?

Brian O'Byrne

Extreme Programming has a large emphasis on the concept of refactoring: Writing code once and only once.
Patterns, particularly the structural patterns mentioned by the Gang of Four, can give good pointers about how to acheive that goal.
(XP states when and where factoring should happen, patterns can show you how.)