Implement exchange().