Returns a Stream that yields pairs of consecutive elements from the source.
Type of items in the source.
Operation that yields pairs of consecutive elements from the source.
const result = pairwise<number>()([1, 2, 3, 4]);console.log([...result]); // [[1, 2], [2, 3], [3, 4]] Copy
const result = pairwise<number>()([1, 2, 3, 4]);console.log([...result]); // [[1, 2], [2, 3], [3, 4]]
Returns a Stream that yields pairs of consecutive elements from the source.