zip

fun <T, R, S> Iterable<T>.zip(otherA: Iterable<R>, otherB: Iterable<S>): List<Triple<T, R, S>>

Returns a list of triples built from the elements of this collection and the otherA as well as otherB array with the same index. The returned list has length of the shortest collection.

Return

list of Triple having the length of the shortest collection

Parameters

otherA

array to be combined

otherB

array to be combined


fun <T, R, S, V> Iterable<T>.zip(otherA: Iterable<R>, otherB: Iterable<S>, transform: (a: T, b: R, c: S) -> V): List<V>

Returns a list of values built from this collection and the otherA as well as otherB array with the same index. For combining the arrays the transform function is applied.

Return

list having the length of the shortest collection

Parameters

otherA

array to be combined

otherB

array to be combined