zipWithNext method

KtList<KtPair<T, T>> zipWithNext()

Returns a list of pairs of each two adjacent elements in this collection.

The returned list is empty if this collection contains less than two elements.

Implementation

KtList<KtPair<T, T>> zipWithNext() =>
    zipWithNextTransform((a, b) => KtPair(a, b));