kotlin.sequences.zip

zip

infix fun <T, R> Sequence<T>.zip(
    other: Sequence<R>
): Sequence<Pair<T, R>>

Returns a sequence of pairs built from elements of both sequences with same indexes. Resulting sequence has length of shortest input sequence.

fun <T, R, V> Sequence<T>.zip(
    other: Sequence<R>, 
    transform: (a: T, b: R) -> V
): Sequence<V>

Returns a sequence of values built from elements of both collections with same indexes using provided 登录查看完整内容