From 2d4e591b5d98dd0e5ddd65571f788ebcce63e7ec Mon Sep 17 00:00:00 2001 From: TakuyaKodama Date: Sun, 15 Apr 2018 01:42:01 +0900 Subject: [PATCH] Add samples for zip on arrays and collections Write the sample references in the template and run the generator --- .../stdlib/common/src/generated/_Arrays.kt | 104 ++++++++++++++++++ .../common/src/generated/_Collections.kt | 8 ++ .../test/samples/collections/iterables.kt | 15 ++- .../src/templates/Generators.kt | 12 ++ 4 files changed, 138 insertions(+), 1 deletion(-) diff --git a/libraries/stdlib/common/src/generated/_Arrays.kt b/libraries/stdlib/common/src/generated/_Arrays.kt index 55a5cadec6f..ec867b725a4 100644 --- a/libraries/stdlib/common/src/generated/_Arrays.kt +++ b/libraries/stdlib/common/src/generated/_Arrays.kt @@ -12207,6 +12207,8 @@ public inline fun CharArray.partition(predicate: (Char) -> Boolean): Pair Array.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12214,6 +12216,8 @@ public infix fun Array.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun ByteArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12221,6 +12225,8 @@ public infix fun ByteArray.zip(other: Array): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun ShortArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12228,6 +12234,8 @@ public infix fun ShortArray.zip(other: Array): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun IntArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12235,6 +12243,8 @@ public infix fun IntArray.zip(other: Array): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun LongArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12242,6 +12252,8 @@ public infix fun LongArray.zip(other: Array): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun FloatArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12249,6 +12261,8 @@ public infix fun FloatArray.zip(other: Array): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun DoubleArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12256,6 +12270,8 @@ public infix fun DoubleArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun BooleanArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12263,6 +12279,8 @@ public infix fun BooleanArray.zip(other: Array): List CharArray.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12270,6 +12288,8 @@ public infix fun CharArray.zip(other: Array): List> { /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun Array.zip(other: Array, transform: (a: T, b: R) -> V): List { val size = minOf(size, other.size) @@ -12282,6 +12302,8 @@ public inline fun Array.zip(other: Array, transform: (a: /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun ByteArray.zip(other: Array, transform: (a: Byte, b: R) -> V): List { val size = minOf(size, other.size) @@ -12294,6 +12316,8 @@ public inline fun ByteArray.zip(other: Array, transform: (a: Byte, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun ShortArray.zip(other: Array, transform: (a: Short, b: R) -> V): List { val size = minOf(size, other.size) @@ -12306,6 +12330,8 @@ public inline fun ShortArray.zip(other: Array, transform: (a: Shor /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun IntArray.zip(other: Array, transform: (a: Int, b: R) -> V): List { val size = minOf(size, other.size) @@ -12318,6 +12344,8 @@ public inline fun IntArray.zip(other: Array, transform: (a: Int, b /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun LongArray.zip(other: Array, transform: (a: Long, b: R) -> V): List { val size = minOf(size, other.size) @@ -12330,6 +12358,8 @@ public inline fun LongArray.zip(other: Array, transform: (a: Long, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun FloatArray.zip(other: Array, transform: (a: Float, b: R) -> V): List { val size = minOf(size, other.size) @@ -12342,6 +12372,8 @@ public inline fun FloatArray.zip(other: Array, transform: (a: Floa /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun DoubleArray.zip(other: Array, transform: (a: Double, b: R) -> V): List { val size = minOf(size, other.size) @@ -12354,6 +12386,8 @@ public inline fun DoubleArray.zip(other: Array, transform: (a: Dou /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun BooleanArray.zip(other: Array, transform: (a: Boolean, b: R) -> V): List { val size = minOf(size, other.size) @@ -12366,6 +12400,8 @@ public inline fun BooleanArray.zip(other: Array, transform: (a: Bo /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun CharArray.zip(other: Array, transform: (a: Char, b: R) -> V): List { val size = minOf(size, other.size) @@ -12378,6 +12414,8 @@ public inline fun CharArray.zip(other: Array, transform: (a: Char, /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun Array.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12385,6 +12423,8 @@ public infix fun Array.zip(other: Iterable): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun ByteArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12392,6 +12432,8 @@ public infix fun ByteArray.zip(other: Iterable): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun ShortArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12399,6 +12441,8 @@ public infix fun ShortArray.zip(other: Iterable): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun IntArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12406,6 +12450,8 @@ public infix fun IntArray.zip(other: Iterable): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun LongArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12413,6 +12459,8 @@ public infix fun LongArray.zip(other: Iterable): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun FloatArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12420,6 +12468,8 @@ public infix fun FloatArray.zip(other: Iterable): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun DoubleArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12427,6 +12477,8 @@ public infix fun DoubleArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun BooleanArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12434,6 +12486,8 @@ public infix fun BooleanArray.zip(other: Iterable): List /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun CharArray.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12441,6 +12495,8 @@ public infix fun CharArray.zip(other: Iterable): List> { /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun Array.zip(other: Iterable, transform: (a: T, b: R) -> V): List { val arraySize = size @@ -12455,6 +12511,8 @@ public inline fun Array.zip(other: Iterable, transform: (a: /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun ByteArray.zip(other: Iterable, transform: (a: Byte, b: R) -> V): List { val arraySize = size @@ -12469,6 +12527,8 @@ public inline fun ByteArray.zip(other: Iterable, transform: (a: Byte, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun ShortArray.zip(other: Iterable, transform: (a: Short, b: R) -> V): List { val arraySize = size @@ -12483,6 +12543,8 @@ public inline fun ShortArray.zip(other: Iterable, transform: (a: Short /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun IntArray.zip(other: Iterable, transform: (a: Int, b: R) -> V): List { val arraySize = size @@ -12497,6 +12559,8 @@ public inline fun IntArray.zip(other: Iterable, transform: (a: Int, b: /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun LongArray.zip(other: Iterable, transform: (a: Long, b: R) -> V): List { val arraySize = size @@ -12511,6 +12575,8 @@ public inline fun LongArray.zip(other: Iterable, transform: (a: Long, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun FloatArray.zip(other: Iterable, transform: (a: Float, b: R) -> V): List { val arraySize = size @@ -12525,6 +12591,8 @@ public inline fun FloatArray.zip(other: Iterable, transform: (a: Float /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun DoubleArray.zip(other: Iterable, transform: (a: Double, b: R) -> V): List { val arraySize = size @@ -12539,6 +12607,8 @@ public inline fun DoubleArray.zip(other: Iterable, transform: (a: Doub /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun BooleanArray.zip(other: Iterable, transform: (a: Boolean, b: R) -> V): List { val arraySize = size @@ -12553,6 +12623,8 @@ public inline fun BooleanArray.zip(other: Iterable, transform: (a: Boo /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun CharArray.zip(other: Iterable, transform: (a: Char, b: R) -> V): List { val arraySize = size @@ -12567,6 +12639,8 @@ public inline fun CharArray.zip(other: Iterable, transform: (a: Char, /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun ByteArray.zip(other: ByteArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12574,6 +12648,8 @@ public infix fun ByteArray.zip(other: ByteArray): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun ShortArray.zip(other: ShortArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12581,6 +12657,8 @@ public infix fun ShortArray.zip(other: ShortArray): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun IntArray.zip(other: IntArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12588,6 +12666,8 @@ public infix fun IntArray.zip(other: IntArray): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun LongArray.zip(other: LongArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12595,6 +12675,8 @@ public infix fun LongArray.zip(other: LongArray): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun FloatArray.zip(other: FloatArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12602,6 +12684,8 @@ public infix fun FloatArray.zip(other: FloatArray): List> { /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun DoubleArray.zip(other: DoubleArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12609,6 +12693,8 @@ public infix fun DoubleArray.zip(other: DoubleArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun BooleanArray.zip(other: BooleanArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12616,6 +12702,8 @@ public infix fun BooleanArray.zip(other: BooleanArray): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -12623,6 +12711,8 @@ public infix fun CharArray.zip(other: CharArray): List> { /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun ByteArray.zip(other: ByteArray, transform: (a: Byte, b: Byte) -> V): List { val size = minOf(size, other.size) @@ -12635,6 +12725,8 @@ public inline fun ByteArray.zip(other: ByteArray, transform: (a: Byte, b: By /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun ShortArray.zip(other: ShortArray, transform: (a: Short, b: Short) -> V): List { val size = minOf(size, other.size) @@ -12647,6 +12739,8 @@ public inline fun ShortArray.zip(other: ShortArray, transform: (a: Short, b: /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun IntArray.zip(other: IntArray, transform: (a: Int, b: Int) -> V): List { val size = minOf(size, other.size) @@ -12659,6 +12753,8 @@ public inline fun IntArray.zip(other: IntArray, transform: (a: Int, b: Int) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun LongArray.zip(other: LongArray, transform: (a: Long, b: Long) -> V): List { val size = minOf(size, other.size) @@ -12671,6 +12767,8 @@ public inline fun LongArray.zip(other: LongArray, transform: (a: Long, b: Lo /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun FloatArray.zip(other: FloatArray, transform: (a: Float, b: Float) -> V): List { val size = minOf(size, other.size) @@ -12683,6 +12781,8 @@ public inline fun FloatArray.zip(other: FloatArray, transform: (a: Float, b: /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun DoubleArray.zip(other: DoubleArray, transform: (a: Double, b: Double) -> V): List { val size = minOf(size, other.size) @@ -12695,6 +12795,8 @@ public inline fun DoubleArray.zip(other: DoubleArray, transform: (a: Double, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun BooleanArray.zip(other: BooleanArray, transform: (a: Boolean, b: Boolean) -> V): List { val size = minOf(size, other.size) @@ -12707,6 +12809,8 @@ public inline fun BooleanArray.zip(other: BooleanArray, transform: (a: Boole /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun CharArray.zip(other: CharArray, transform: (a: Char, b: Char) -> V): List { val size = minOf(size, other.size) diff --git a/libraries/stdlib/common/src/generated/_Collections.kt b/libraries/stdlib/common/src/generated/_Collections.kt index bdf8f729e2f..2d2aef5b00c 100644 --- a/libraries/stdlib/common/src/generated/_Collections.kt +++ b/libraries/stdlib/common/src/generated/_Collections.kt @@ -2086,6 +2086,8 @@ public fun Iterable.windowed(size: Int, step: Int = 1, partialWindows: /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun Iterable.zip(other: Array): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -2093,6 +2095,8 @@ public infix fun Iterable.zip(other: Array): List> { /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun Iterable.zip(other: Array, transform: (a: T, b: R) -> V): List { val arraySize = other.size @@ -2107,6 +2111,8 @@ public inline fun Iterable.zip(other: Array, transform: (a: /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterable */ public infix fun Iterable.zip(other: Iterable): List> { return zip(other) { t1, t2 -> t1 to t2 } @@ -2114,6 +2120,8 @@ public infix fun Iterable.zip(other: Iterable): List> { /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + * + * @sample samples.collections.Iterables.Operations.zipIterableWithTransform */ public inline fun Iterable.zip(other: Iterable, transform: (a: T, b: R) -> V): List { val first = iterator() diff --git a/libraries/stdlib/samples/test/samples/collections/iterables.kt b/libraries/stdlib/samples/test/samples/collections/iterables.kt index 6e4ed8c8e3a..2fad793115d 100644 --- a/libraries/stdlib/samples/test/samples/collections/iterables.kt +++ b/libraries/stdlib/samples/test/samples/collections/iterables.kt @@ -18,7 +18,6 @@ package samples.collections import samples.* import kotlin.coroutines.experimental.buildIterator -import kotlin.test.* @RunWith(Enclosed::class) class Iterables { @@ -59,5 +58,19 @@ class Iterables { assertPrints(list.unzip(), "([1, 2, 3], [a, b, c])") } + @Sample + fun zipIterable() { + val listA = listOf("a", "b", "c") + val listB = listOf(1, 2, 3, 4) + assertPrints(listA zip listB, "[(a, 1), (b, 2), (c, 3)]") + } + + @Sample + fun zipIterableWithTransform() { + val listA = listOf("a", "b", "c") + val listB = listOf(1, 2, 3, 4) + val result = listA.zip(listB) { a, b -> "$a$b" } + assertPrints(result, "[a1, b2, c3]") + } } } \ No newline at end of file diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt index 13ef48c2ae9..bd17d518069 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt @@ -1005,6 +1005,8 @@ object Generators : TemplateGroupBase() { doc { """ Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + + @sample samples.collections.Iterables.Operations.zipIterableWithTransform """ } typeParam("R") @@ -1042,6 +1044,8 @@ object Generators : TemplateGroupBase() { doc { """ Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + + @sample samples.collections.Iterables.Operations.zipIterableWithTransform """ } typeParam("R") @@ -1079,6 +1083,8 @@ object Generators : TemplateGroupBase() { doc { """ Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. + + @sample samples.collections.Iterables.Operations.zipIterableWithTransform """ } typeParam("V") @@ -1147,6 +1153,8 @@ object Generators : TemplateGroupBase() { doc { """ Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + + @sample samples.collections.Iterables.Operations.zipIterable """ } typeParam("R") @@ -1182,6 +1190,8 @@ object Generators : TemplateGroupBase() { doc { """ Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + + @sample samples.collections.Iterables.Operations.zipIterable """ } typeParam("R") @@ -1200,6 +1210,8 @@ object Generators : TemplateGroupBase() { doc { """ Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. + + @sample samples.collections.Iterables.Operations.zipIterable """ } returns("List>")