pairwiseAsync
pairwiseAsync<
T>(iterable):AsyncIterableIterator<[T,T]>
Defined in: packages/core/src/iterable/async/pairwise.ts:15
Yields each consecutive overlapping pair of elements.
The async counterpart of pairwise. An input of fewer than two elements
yields nothing.
Time complexity: O(n), allocating one tuple per pair.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”The input iterable, sync or async.
Returns
Section titled “Returns”AsyncIterableIterator<[T, T]>
An iterator over the pairs, each holding an element and the one after it.