Function itertools::peek_nth[][src]

pub fn peek_nth<I>(iterable: I) -> PeekNth<I::IntoIter>

Notable traits for PeekNth<I>

impl<I> Iterator for PeekNth<I> where
    I: Iterator
type Item = I::Item;
where
    I: IntoIterator

A drop-in replacement for std::iter::Peekable which adds a peek_nth method allowing the user to peek at a value several iterations forward without advancing the base iterator.

This differs from multipeek in that subsequent calls to peek or peek_nth will always return the same value until next is called (making reset_peek unnecessary).