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 transform. Resulting sequence has length of shortest input sequences.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/zip.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部