pub fn cycle_count<T, I: Clone + Iterator<Item = T>>(
    iter: I
) -> impl Iterator<Item = (T, usize)>
Expand description

Repeats all the items of the iterator forever, but returns the cycle number alongside. Inefficient due to all the vectors, but doesn’t have to be fast.