adjacent-pair-iterator 0.1.2

An iterator over adjacent pairs in another iterator.
Documentation

adjacent-pair-iterator

An iterator over adjacent pairs in another iterator.

Usage

[dependencies]
adjacent-pair-iterator = "0.1.2"
extern crate adjacent_pair_iterator; // 2015 Edition only

use adjacent_pair_iterator::AdjacentPairIterator;

fn main() {
    let array = [1, 2, 3, 4];

    for pair in array.iter().adjacent_pairs() {
        println!("{:?}", pair);
        // (1, 2)
        // (2, 3)
        // (3, 4)
    }
}