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.
It is however not a drop-in replacement at the moment, since the methods next_if and next_if_eq isn't implemented.
Currently the documentation for
itertools::peek_nth
says:It is however not a drop-in replacement at the moment, since the methods
next_if
andnext_if_eq
isn't implemented.