Documentation
1
2
3
4
5
6
use rand::Rng;

pub fn iter<T>(li: &[T]) -> impl Iterator<Item = &T> {
  let offset = rand::rng().random_range(0..li.len());
  li[offset..].into_iter().chain(li[..offset].into_iter())
}