pub fn pairwise_iter<T>(v: &[T]) -> impl Iterator<Item = (&T, &T)>Expand description
Iterates through every pair in the input slice. Returns references to the input.
let input = [1, 2, 3];
let want = [(&input[0], &input[1]), (&input[0], &input[2]), (&input[1], &input[2])];
assert_eq!(aoclib_rs::iter::pairwise_iter(&input).collect::<Vec<_>>(), want);