An iterator over adjacent pairs in another iterator.
toml
[dependencies]
adjacent-pair-iterator = "0.1.2"
```rust extern crate adjacentpairiterator; // 2015 Edition only
use adjacentpairiterator::AdjacentPairIterator;
fn main() { let array = [1, 2, 3, 4];
for pair in array.iter().adjacent_pairs() {
println!("{:?}", pair);
// (1, 2)
// (2, 3)
// (3, 4)
}
} ```