The purpose of `RepeatIterator` is unclear to me. What is it, and why is it needed?