Function peroxide::util::useful::auto_zip

source ·
pub fn auto_zip<T: Clone>(x: &Vec<T>) -> Vec<(T, T)>
Expand description

Auto-zip

§Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = vec![1, 2, 3];
let a_zipped = auto_zip(&a);
assert_eq!(a_zipped, vec![(1, 2), (2, 3)]);