A lockstep iterator adaptor
The lockstep iterator adaptor is an adapter similar to zip
, but instead
uses a control flow closure to selectively skip elements from either the left or the right
iterator, or yield the pair. This adaptor is primarily useful when working with sorted data.
The main entrypoint is the lockstep
function.
This crate is #![no_std]
and #![forbid(unsafe_code)]
.
Examples
Re-implement zip
.
use ;
Compose two sorted iterators to only yield elements which they have in common.
use Ordering;
use ;
/// Assumes that `left` and `right` are sorted.