import { pairwise } from "https://deno.land/x/itertools@v1.1.1/more-itertools.ts";
Returns an iterator of paired items, overlapping, from the original. When
the input iterable has a finite number of items n
, the outputted iterable
will have n - 1
items.
>>> pairwise([8, 2, 0, 7])
[(8, 2), (2, 0), (0, 7)]
Parameters
iterable: Iterable<T>