zip
@ExperimentalUnsignedTypes infix fun <R> ULongArray.zip(
other: Array<out R>
): List<Pair<ULong, R>>
(source)
@ExperimentalUnsignedTypes infix fun <R> UByteArray.zip(
other: Array<out R>
): List<Pair<UByte, R>>
(source)
@ExperimentalUnsignedTypes infix fun <R> UShortArray.zip(
other: Array<out R>
): List<Pair<UShort, R>>
(source)
@ExperimentalUnsignedTypes infix fun ULongArray.zip(
other: ULongArray
): List<Pair<ULong, ULong>>
(source)
@ExperimentalUnsignedTypes infix fun UByteArray.zip(
other: UByteArray
): List<Pair<UByte, UByte>>
(source)
@ExperimentalUnsignedTypes infix fun UShortArray.zip(
other: UShortArray
): List<Pair<UShort, UShort>>
(source)
Returns a list of pairs built from the elements of this
array and the other array with the same index.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
println(listA zip listB) // [(a, 1), (b, 2), (c, 3)]
//sampleEnd
}
inline fun <R, V> ShortArray.zip(
other: Array<out R>,
transform: (a: Short, b: R) -> V
): List<V>
(source)
inline fun <R, V> FloatArray.zip(
other: Array<out R>,
transform: (a: Float, b: R) -> V
): List<V>
(source)
inline fun <R, V> DoubleArray.zip(
other: Array<out R>,
transform: (a: Double, b: R) -> V
): List<V>
(source)
inline fun <R, V> BooleanArray.zip(
other: Array<out R>,
transform: (a: Boolean, b: R) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <R, V> ULongArray.zip(
other: Array<out R>,
transform: (a: ULong, b: R) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <R, V> UByteArray.zip(
other: Array<out R>,
transform: (a: UByte, b: R) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <R, V> UShortArray.zip(
other: Array<out R>,
transform: (a: UShort, b: R) -> V
): List<V>
(source)
Returns a list of values built from the elements of this
array and the other array with the same index
using the provided transform function applied to each pair of elements.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
val result = listA.zip(listB) { a, b -> "$a$b" }
println(result) // [a1, b2, c3]
//sampleEnd
}
Returns a list of pairs built from the elements of this
collection and other array with the same index.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
println(listA zip listB) // [(a, 1), (b, 2), (c, 3)]
//sampleEnd
}
inline fun <R, V> ShortArray.zip(
other: Iterable<R>,
transform: (a: Short, b: R) -> V
): List<V>
(source)
inline fun <R, V> FloatArray.zip(
other: Iterable<R>,
transform: (a: Float, b: R) -> V
): List<V>
(source)
inline fun <R, V> DoubleArray.zip(
other: Iterable<R>,
transform: (a: Double, b: R) -> V
): List<V>
(source)
inline fun <R, V> BooleanArray.zip(
other: Iterable<R>,
transform: (a: Boolean, b: R) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <R, V> ULongArray.zip(
other: Iterable<R>,
transform: (a: ULong, b: R) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <R, V> UByteArray.zip(
other: Iterable<R>,
transform: (a: UByte, b: R) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <R, V> UShortArray.zip(
other: Iterable<R>,
transform: (a: UShort, b: R) -> V
): List<V>
(source)
Returns a list of values built from the elements of this
array and the other collection with the same index
using the provided transform function applied to each pair of elements.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
val result = listA.zip(listB) { a, b -> "$a$b" }
println(result) // [a1, b2, c3]
//sampleEnd
}
inline fun <V> ShortArray.zip(
other: ShortArray,
transform: (a: Short, b: Short) -> V
): List<V>
(source)
inline fun <V> FloatArray.zip(
other: FloatArray,
transform: (a: Float, b: Float) -> V
): List<V>
(source)
inline fun <V> DoubleArray.zip(
other: DoubleArray,
transform: (a: Double, b: Double) -> V
): List<V>
(source)
inline fun <V> BooleanArray.zip(
other: BooleanArray,
transform: (a: Boolean, b: Boolean) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <V> ULongArray.zip(
other: ULongArray,
transform: (a: ULong, b: ULong) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <V> UByteArray.zip(
other: UByteArray,
transform: (a: UByte, b: UByte) -> V
): List<V>
(source)
@ExperimentalUnsignedTypes inline fun <V> UShortArray.zip(
other: UShortArray,
transform: (a: UShort, b: UShort) -> V
): List<V>
(source)
Returns a list of values built from the elements of this
array and the other array with the same index
using the provided transform function applied to each pair of elements.
The returned list has length of the shortest array.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
val result = listA.zip(listB) { a, b -> "$a$b" }
println(result) // [a1, b2, c3]
//sampleEnd
}
Returns a list of pairs built from the elements of this
collection and the other array with the same index.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
println(listA zip listB) // [(a, 1), (b, 2), (c, 3)]
//sampleEnd
}
Returns a list of values built from the elements of this
collection and the other array with the same index
using the provided transform function applied to each pair of elements.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
val result = listA.zip(listB) { a, b -> "$a$b" }
println(result) // [a1, b2, c3]
//sampleEnd
}
Returns a list of pairs built from the elements of this
collection and other collection with the same index.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
println(listA zip listB) // [(a, 1), (b, 2), (c, 3)]
//sampleEnd
}
Returns a list of values built from the elements of this
collection and the other collection with the same index
using the provided transform function applied to each pair of elements.
The returned list has length of the shortest collection.
fun main(args: Array<String>) {
//sampleStart
val listA = listOf("a", "b", "c")
val listB = listOf(1, 2, 3, 4)
val result = listA.zip(listB) { a, b -> "$a$b" }
println(result) // [a1, b2, c3]
//sampleEnd
}