diff --git a/js/js.libraries/src/core/Comparator.kt b/js/js.libraries/src/core/Comparator.kt index af19c1a26ab..052a762036c 100644 --- a/js/js.libraries/src/core/Comparator.kt +++ b/js/js.libraries/src/core/Comparator.kt @@ -21,6 +21,6 @@ public interface Comparator { @JsName("compare") fun compare(a: T, b: T): Int } -public inline fun Comparator(crossinline comparison: (T, T) -> Int): Comparator = object : Comparator { +public inline fun Comparator(crossinline comparison: (a: T, b: T) -> Int): Comparator = object : Comparator { override fun compare(a: T, b: T): Int = comparison(a, b) } diff --git a/js/js.libraries/src/core/generated/_ArraysJs.kt b/js/js.libraries/src/core/generated/_ArraysJs.kt index 80d75ad6b16..2d958e33b13 100644 --- a/js/js.libraries/src/core/generated/_ArraysJs.kt +++ b/js/js.libraries/src/core/generated/_ArraysJs.kt @@ -2974,7 +2974,7 @@ public inline fun CharArray.filter(predicate: (Char) -> Boolean): List { * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun Array.filterIndexed(predicate: (Int, T) -> Boolean): List { +public inline fun Array.filterIndexed(predicate: (index: Int, T) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -2983,7 +2983,7 @@ public inline fun Array.filterIndexed(predicate: (Int, T) -> Boolean) * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun ByteArray.filterIndexed(predicate: (Int, Byte) -> Boolean): List { +public inline fun ByteArray.filterIndexed(predicate: (index: Int, Byte) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -2992,7 +2992,7 @@ public inline fun ByteArray.filterIndexed(predicate: (Int, Byte) -> Boolean): Li * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun ShortArray.filterIndexed(predicate: (Int, Short) -> Boolean): List { +public inline fun ShortArray.filterIndexed(predicate: (index: Int, Short) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3001,7 +3001,7 @@ public inline fun ShortArray.filterIndexed(predicate: (Int, Short) -> Boolean): * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun IntArray.filterIndexed(predicate: (Int, Int) -> Boolean): List { +public inline fun IntArray.filterIndexed(predicate: (index: Int, Int) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3010,7 +3010,7 @@ public inline fun IntArray.filterIndexed(predicate: (Int, Int) -> Boolean): List * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun LongArray.filterIndexed(predicate: (Int, Long) -> Boolean): List { +public inline fun LongArray.filterIndexed(predicate: (index: Int, Long) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3019,7 +3019,7 @@ public inline fun LongArray.filterIndexed(predicate: (Int, Long) -> Boolean): Li * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun FloatArray.filterIndexed(predicate: (Int, Float) -> Boolean): List { +public inline fun FloatArray.filterIndexed(predicate: (index: Int, Float) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3028,7 +3028,7 @@ public inline fun FloatArray.filterIndexed(predicate: (Int, Float) -> Boolean): * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun DoubleArray.filterIndexed(predicate: (Int, Double) -> Boolean): List { +public inline fun DoubleArray.filterIndexed(predicate: (index: Int, Double) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3037,7 +3037,7 @@ public inline fun DoubleArray.filterIndexed(predicate: (Int, Double) -> Boolean) * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun BooleanArray.filterIndexed(predicate: (Int, Boolean) -> Boolean): List { +public inline fun BooleanArray.filterIndexed(predicate: (index: Int, Boolean) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3046,7 +3046,7 @@ public inline fun BooleanArray.filterIndexed(predicate: (Int, Boolean) -> Boolea * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun CharArray.filterIndexed(predicate: (Int, Char) -> Boolean): List { +public inline fun CharArray.filterIndexed(predicate: (index: Int, Char) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3055,7 +3055,7 @@ public inline fun CharArray.filterIndexed(predicate: (Int, Char) -> Boolean): Li * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > Array.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C { +public inline fun > Array.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3067,7 +3067,7 @@ public inline fun > Array.filterIndexedTo( * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > ByteArray.filterIndexedTo(destination: C, predicate: (Int, Byte) -> Boolean): C { +public inline fun > ByteArray.filterIndexedTo(destination: C, predicate: (index: Int, Byte) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3079,7 +3079,7 @@ public inline fun > ByteArray.filterIndexedTo(des * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > ShortArray.filterIndexedTo(destination: C, predicate: (Int, Short) -> Boolean): C { +public inline fun > ShortArray.filterIndexedTo(destination: C, predicate: (index: Int, Short) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3091,7 +3091,7 @@ public inline fun > ShortArray.filterIndexedTo(d * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > IntArray.filterIndexedTo(destination: C, predicate: (Int, Int) -> Boolean): C { +public inline fun > IntArray.filterIndexedTo(destination: C, predicate: (index: Int, Int) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3103,7 +3103,7 @@ public inline fun > IntArray.filterIndexedTo(desti * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > LongArray.filterIndexedTo(destination: C, predicate: (Int, Long) -> Boolean): C { +public inline fun > LongArray.filterIndexedTo(destination: C, predicate: (index: Int, Long) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3115,7 +3115,7 @@ public inline fun > LongArray.filterIndexedTo(des * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > FloatArray.filterIndexedTo(destination: C, predicate: (Int, Float) -> Boolean): C { +public inline fun > FloatArray.filterIndexedTo(destination: C, predicate: (index: Int, Float) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3127,7 +3127,7 @@ public inline fun > FloatArray.filterIndexedTo(d * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > DoubleArray.filterIndexedTo(destination: C, predicate: (Int, Double) -> Boolean): C { +public inline fun > DoubleArray.filterIndexedTo(destination: C, predicate: (index: Int, Double) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3139,7 +3139,7 @@ public inline fun > DoubleArray.filterIndexedTo * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > BooleanArray.filterIndexedTo(destination: C, predicate: (Int, Boolean) -> Boolean): C { +public inline fun > BooleanArray.filterIndexedTo(destination: C, predicate: (index: Int, Boolean) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3151,7 +3151,7 @@ public inline fun > BooleanArray.filterIndexed * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > CharArray.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C { +public inline fun > CharArray.filterIndexedTo(destination: C, predicate: (index: Int, Char) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -7720,7 +7720,7 @@ public inline fun CharArray.map(transform: (Char) -> R): List { * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun Array.mapIndexed(transform: (Int, T) -> R): List { +public inline fun Array.mapIndexed(transform: (index: Int, T) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7730,7 +7730,7 @@ public inline fun Array.mapIndexed(transform: (Int, T) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun ByteArray.mapIndexed(transform: (Int, Byte) -> R): List { +public inline fun ByteArray.mapIndexed(transform: (index: Int, Byte) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7740,7 +7740,7 @@ public inline fun ByteArray.mapIndexed(transform: (Int, Byte) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun ShortArray.mapIndexed(transform: (Int, Short) -> R): List { +public inline fun ShortArray.mapIndexed(transform: (index: Int, Short) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7750,7 +7750,7 @@ public inline fun ShortArray.mapIndexed(transform: (Int, Short) -> R): List< * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun IntArray.mapIndexed(transform: (Int, Int) -> R): List { +public inline fun IntArray.mapIndexed(transform: (index: Int, Int) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7760,7 +7760,7 @@ public inline fun IntArray.mapIndexed(transform: (Int, Int) -> R): List { * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun LongArray.mapIndexed(transform: (Int, Long) -> R): List { +public inline fun LongArray.mapIndexed(transform: (index: Int, Long) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7770,7 +7770,7 @@ public inline fun LongArray.mapIndexed(transform: (Int, Long) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun FloatArray.mapIndexed(transform: (Int, Float) -> R): List { +public inline fun FloatArray.mapIndexed(transform: (index: Int, Float) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7780,7 +7780,7 @@ public inline fun FloatArray.mapIndexed(transform: (Int, Float) -> R): List< * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun DoubleArray.mapIndexed(transform: (Int, Double) -> R): List { +public inline fun DoubleArray.mapIndexed(transform: (index: Int, Double) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7790,7 +7790,7 @@ public inline fun DoubleArray.mapIndexed(transform: (Int, Double) -> R): Lis * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun BooleanArray.mapIndexed(transform: (Int, Boolean) -> R): List { +public inline fun BooleanArray.mapIndexed(transform: (index: Int, Boolean) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7800,7 +7800,7 @@ public inline fun BooleanArray.mapIndexed(transform: (Int, Boolean) -> R): L * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun CharArray.mapIndexed(transform: (Int, Char) -> R): List { +public inline fun CharArray.mapIndexed(transform: (index: Int, Char) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7810,7 +7810,7 @@ public inline fun CharArray.mapIndexed(transform: (Int, Char) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun Array.mapIndexedNotNull(transform: (Int, T) -> R?): List { +public inline fun Array.mapIndexedNotNull(transform: (index: Int, T) -> R?): List { return mapIndexedNotNullTo(ArrayList(), transform) } @@ -7820,7 +7820,7 @@ public inline fun Array.mapIndexedNotNull(transform: (Int, T * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Array.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C { +public inline fun > Array.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -7831,7 +7831,7 @@ public inline fun > Array.mapInde * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Array.mapIndexedTo(destination: C, transform: (Int, T) -> R): C { +public inline fun > Array.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7844,7 +7844,7 @@ public inline fun > Array.mapIndexedTo( * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > ByteArray.mapIndexedTo(destination: C, transform: (Int, Byte) -> R): C { +public inline fun > ByteArray.mapIndexedTo(destination: C, transform: (index: Int, Byte) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7857,7 +7857,7 @@ public inline fun > ByteArray.mapIndexedTo(destin * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > ShortArray.mapIndexedTo(destination: C, transform: (Int, Short) -> R): C { +public inline fun > ShortArray.mapIndexedTo(destination: C, transform: (index: Int, Short) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7870,7 +7870,7 @@ public inline fun > ShortArray.mapIndexedTo(desti * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > IntArray.mapIndexedTo(destination: C, transform: (Int, Int) -> R): C { +public inline fun > IntArray.mapIndexedTo(destination: C, transform: (index: Int, Int) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7883,7 +7883,7 @@ public inline fun > IntArray.mapIndexedTo(destina * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > LongArray.mapIndexedTo(destination: C, transform: (Int, Long) -> R): C { +public inline fun > LongArray.mapIndexedTo(destination: C, transform: (index: Int, Long) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7896,7 +7896,7 @@ public inline fun > LongArray.mapIndexedTo(destin * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > FloatArray.mapIndexedTo(destination: C, transform: (Int, Float) -> R): C { +public inline fun > FloatArray.mapIndexedTo(destination: C, transform: (index: Int, Float) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7909,7 +7909,7 @@ public inline fun > FloatArray.mapIndexedTo(desti * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > DoubleArray.mapIndexedTo(destination: C, transform: (Int, Double) -> R): C { +public inline fun > DoubleArray.mapIndexedTo(destination: C, transform: (index: Int, Double) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7922,7 +7922,7 @@ public inline fun > DoubleArray.mapIndexedTo(dest * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > BooleanArray.mapIndexedTo(destination: C, transform: (Int, Boolean) -> R): C { +public inline fun > BooleanArray.mapIndexedTo(destination: C, transform: (index: Int, Boolean) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7935,7 +7935,7 @@ public inline fun > BooleanArray.mapIndexedTo(des * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > CharArray.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C { +public inline fun > CharArray.mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -9132,7 +9132,7 @@ public inline fun CharArray.count(predicate: (Char) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Array.fold(initial: R, operation: (R, T) -> R): R { +public inline fun Array.fold(initial: R, operation: (acc: R, T) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9141,7 +9141,7 @@ public inline fun Array.fold(initial: R, operation: (R, T) -> R): /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ByteArray.fold(initial: R, operation: (R, Byte) -> R): R { +public inline fun ByteArray.fold(initial: R, operation: (acc: R, Byte) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9150,7 +9150,7 @@ public inline fun ByteArray.fold(initial: R, operation: (R, Byte) -> R): R { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ShortArray.fold(initial: R, operation: (R, Short) -> R): R { +public inline fun ShortArray.fold(initial: R, operation: (acc: R, Short) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9159,7 +9159,7 @@ public inline fun ShortArray.fold(initial: R, operation: (R, Short) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun IntArray.fold(initial: R, operation: (R, Int) -> R): R { +public inline fun IntArray.fold(initial: R, operation: (acc: R, Int) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9168,7 +9168,7 @@ public inline fun IntArray.fold(initial: R, operation: (R, Int) -> R): R { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun LongArray.fold(initial: R, operation: (R, Long) -> R): R { +public inline fun LongArray.fold(initial: R, operation: (acc: R, Long) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9177,7 +9177,7 @@ public inline fun LongArray.fold(initial: R, operation: (R, Long) -> R): R { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun FloatArray.fold(initial: R, operation: (R, Float) -> R): R { +public inline fun FloatArray.fold(initial: R, operation: (acc: R, Float) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9186,7 +9186,7 @@ public inline fun FloatArray.fold(initial: R, operation: (R, Float) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun DoubleArray.fold(initial: R, operation: (R, Double) -> R): R { +public inline fun DoubleArray.fold(initial: R, operation: (acc: R, Double) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9195,7 +9195,7 @@ public inline fun DoubleArray.fold(initial: R, operation: (R, Double) -> R): /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun BooleanArray.fold(initial: R, operation: (R, Boolean) -> R): R { +public inline fun BooleanArray.fold(initial: R, operation: (acc: R, Boolean) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9204,7 +9204,7 @@ public inline fun BooleanArray.fold(initial: R, operation: (R, Boolean) -> R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun CharArray.fold(initial: R, operation: (R, Char) -> R): R { +public inline fun CharArray.fold(initial: R, operation: (acc: R, Char) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9216,7 +9216,7 @@ public inline fun CharArray.fold(initial: R, operation: (R, Char) -> R): R { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun Array.foldIndexed(initial: R, operation: (Int, R, T) -> R): R { +public inline fun Array.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9229,7 +9229,7 @@ public inline fun Array.foldIndexed(initial: R, operation: (Int, R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun ByteArray.foldIndexed(initial: R, operation: (Int, R, Byte) -> R): R { +public inline fun ByteArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Byte) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9242,7 +9242,7 @@ public inline fun ByteArray.foldIndexed(initial: R, operation: (Int, R, Byte * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun ShortArray.foldIndexed(initial: R, operation: (Int, R, Short) -> R): R { +public inline fun ShortArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Short) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9255,7 +9255,7 @@ public inline fun ShortArray.foldIndexed(initial: R, operation: (Int, R, Sho * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun IntArray.foldIndexed(initial: R, operation: (Int, R, Int) -> R): R { +public inline fun IntArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Int) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9268,7 +9268,7 @@ public inline fun IntArray.foldIndexed(initial: R, operation: (Int, R, Int) * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun LongArray.foldIndexed(initial: R, operation: (Int, R, Long) -> R): R { +public inline fun LongArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Long) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9281,7 +9281,7 @@ public inline fun LongArray.foldIndexed(initial: R, operation: (Int, R, Long * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun FloatArray.foldIndexed(initial: R, operation: (Int, R, Float) -> R): R { +public inline fun FloatArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Float) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9294,7 +9294,7 @@ public inline fun FloatArray.foldIndexed(initial: R, operation: (Int, R, Flo * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun DoubleArray.foldIndexed(initial: R, operation: (Int, R, Double) -> R): R { +public inline fun DoubleArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Double) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9307,7 +9307,7 @@ public inline fun DoubleArray.foldIndexed(initial: R, operation: (Int, R, Do * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun BooleanArray.foldIndexed(initial: R, operation: (Int, R, Boolean) -> R): R { +public inline fun BooleanArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Boolean) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9320,7 +9320,7 @@ public inline fun BooleanArray.foldIndexed(initial: R, operation: (Int, R, B * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun CharArray.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R { +public inline fun CharArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9330,7 +9330,7 @@ public inline fun CharArray.foldIndexed(initial: R, operation: (Int, R, Char /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun Array.foldRight(initial: R, operation: (T, R) -> R): R { +public inline fun Array.foldRight(initial: R, operation: (T, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9342,7 +9342,7 @@ public inline fun Array.foldRight(initial: R, operation: (T, R) -> /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ByteArray.foldRight(initial: R, operation: (Byte, R) -> R): R { +public inline fun ByteArray.foldRight(initial: R, operation: (Byte, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9354,7 +9354,7 @@ public inline fun ByteArray.foldRight(initial: R, operation: (Byte, R) -> R) /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ShortArray.foldRight(initial: R, operation: (Short, R) -> R): R { +public inline fun ShortArray.foldRight(initial: R, operation: (Short, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9366,7 +9366,7 @@ public inline fun ShortArray.foldRight(initial: R, operation: (Short, R) -> /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun IntArray.foldRight(initial: R, operation: (Int, R) -> R): R { +public inline fun IntArray.foldRight(initial: R, operation: (Int, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9378,7 +9378,7 @@ public inline fun IntArray.foldRight(initial: R, operation: (Int, R) -> R): /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun LongArray.foldRight(initial: R, operation: (Long, R) -> R): R { +public inline fun LongArray.foldRight(initial: R, operation: (Long, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9390,7 +9390,7 @@ public inline fun LongArray.foldRight(initial: R, operation: (Long, R) -> R) /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun FloatArray.foldRight(initial: R, operation: (Float, R) -> R): R { +public inline fun FloatArray.foldRight(initial: R, operation: (Float, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9402,7 +9402,7 @@ public inline fun FloatArray.foldRight(initial: R, operation: (Float, R) -> /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun DoubleArray.foldRight(initial: R, operation: (Double, R) -> R): R { +public inline fun DoubleArray.foldRight(initial: R, operation: (Double, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9414,7 +9414,7 @@ public inline fun DoubleArray.foldRight(initial: R, operation: (Double, R) - /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, R) -> R): R { +public inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9426,7 +9426,7 @@ public inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, R) /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun CharArray.foldRight(initial: R, operation: (Char, R) -> R): R { +public inline fun CharArray.foldRight(initial: R, operation: (Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9441,7 +9441,7 @@ public inline fun CharArray.foldRight(initial: R, operation: (Char, R) -> R) * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun Array.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R { +public inline fun Array.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9457,7 +9457,7 @@ public inline fun Array.foldRightIndexed(initial: R, operation: (I * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ByteArray.foldRightIndexed(initial: R, operation: (Int, Byte, R) -> R): R { +public inline fun ByteArray.foldRightIndexed(initial: R, operation: (index: Int, Byte, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9473,7 +9473,7 @@ public inline fun ByteArray.foldRightIndexed(initial: R, operation: (Int, By * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ShortArray.foldRightIndexed(initial: R, operation: (Int, Short, R) -> R): R { +public inline fun ShortArray.foldRightIndexed(initial: R, operation: (index: Int, Short, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9489,7 +9489,7 @@ public inline fun ShortArray.foldRightIndexed(initial: R, operation: (Int, S * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun IntArray.foldRightIndexed(initial: R, operation: (Int, Int, R) -> R): R { +public inline fun IntArray.foldRightIndexed(initial: R, operation: (index: Int, Int, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9505,7 +9505,7 @@ public inline fun IntArray.foldRightIndexed(initial: R, operation: (Int, Int * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun LongArray.foldRightIndexed(initial: R, operation: (Int, Long, R) -> R): R { +public inline fun LongArray.foldRightIndexed(initial: R, operation: (index: Int, Long, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9521,7 +9521,7 @@ public inline fun LongArray.foldRightIndexed(initial: R, operation: (Int, Lo * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun FloatArray.foldRightIndexed(initial: R, operation: (Int, Float, R) -> R): R { +public inline fun FloatArray.foldRightIndexed(initial: R, operation: (index: Int, Float, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9537,7 +9537,7 @@ public inline fun FloatArray.foldRightIndexed(initial: R, operation: (Int, F * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun DoubleArray.foldRightIndexed(initial: R, operation: (Int, Double, R) -> R): R { +public inline fun DoubleArray.foldRightIndexed(initial: R, operation: (index: Int, Double, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9553,7 +9553,7 @@ public inline fun DoubleArray.foldRightIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun BooleanArray.foldRightIndexed(initial: R, operation: (Int, Boolean, R) -> R): R { +public inline fun BooleanArray.foldRightIndexed(initial: R, operation: (index: Int, Boolean, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9569,7 +9569,7 @@ public inline fun BooleanArray.foldRightIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharArray.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R { +public inline fun CharArray.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9647,7 +9647,7 @@ public inline fun CharArray.forEach(action: (Char) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun Array.forEachIndexed(action: (Int, T) -> Unit): Unit { +public inline fun Array.forEachIndexed(action: (index: Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9657,7 +9657,7 @@ public inline fun Array.forEachIndexed(action: (Int, T) -> Unit): Uni * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun ByteArray.forEachIndexed(action: (Int, Byte) -> Unit): Unit { +public inline fun ByteArray.forEachIndexed(action: (index: Int, Byte) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9667,7 +9667,7 @@ public inline fun ByteArray.forEachIndexed(action: (Int, Byte) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun ShortArray.forEachIndexed(action: (Int, Short) -> Unit): Unit { +public inline fun ShortArray.forEachIndexed(action: (index: Int, Short) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9677,7 +9677,7 @@ public inline fun ShortArray.forEachIndexed(action: (Int, Short) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun IntArray.forEachIndexed(action: (Int, Int) -> Unit): Unit { +public inline fun IntArray.forEachIndexed(action: (index: Int, Int) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9687,7 +9687,7 @@ public inline fun IntArray.forEachIndexed(action: (Int, Int) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun LongArray.forEachIndexed(action: (Int, Long) -> Unit): Unit { +public inline fun LongArray.forEachIndexed(action: (index: Int, Long) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9697,7 +9697,7 @@ public inline fun LongArray.forEachIndexed(action: (Int, Long) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun FloatArray.forEachIndexed(action: (Int, Float) -> Unit): Unit { +public inline fun FloatArray.forEachIndexed(action: (index: Int, Float) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9707,7 +9707,7 @@ public inline fun FloatArray.forEachIndexed(action: (Int, Float) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun DoubleArray.forEachIndexed(action: (Int, Double) -> Unit): Unit { +public inline fun DoubleArray.forEachIndexed(action: (index: Int, Double) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9717,7 +9717,7 @@ public inline fun DoubleArray.forEachIndexed(action: (Int, Double) -> Unit): Uni * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun BooleanArray.forEachIndexed(action: (Int, Boolean) -> Unit): Unit { +public inline fun BooleanArray.forEachIndexed(action: (index: Int, Boolean) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9727,7 +9727,7 @@ public inline fun BooleanArray.forEachIndexed(action: (Int, Boolean) -> Unit): U * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun CharArray.forEachIndexed(action: (Int, Char) -> Unit): Unit { +public inline fun CharArray.forEachIndexed(action: (index: Int, Char) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -10733,7 +10733,7 @@ public inline fun CharArray.none(predicate: (Char) -> Boolean): Boolean { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Array.reduce(operation: (S, T) -> S): S { +public inline fun Array.reduce(operation: (acc: S, T) -> S): S { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = this[0] @@ -10746,7 +10746,7 @@ public inline fun Array.reduce(operation: (S, T) -> S): S { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ByteArray.reduce(operation: (Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduce(operation: (acc: Byte, Byte) -> Byte): Byte { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10759,7 +10759,7 @@ public inline fun ByteArray.reduce(operation: (Byte, Byte) -> Byte): Byte { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ShortArray.reduce(operation: (Short, Short) -> Short): Short { +public inline fun ShortArray.reduce(operation: (acc: Short, Short) -> Short): Short { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10772,7 +10772,7 @@ public inline fun ShortArray.reduce(operation: (Short, Short) -> Short): Short { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun IntArray.reduce(operation: (Int, Int) -> Int): Int { +public inline fun IntArray.reduce(operation: (acc: Int, Int) -> Int): Int { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10785,7 +10785,7 @@ public inline fun IntArray.reduce(operation: (Int, Int) -> Int): Int { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun LongArray.reduce(operation: (Long, Long) -> Long): Long { +public inline fun LongArray.reduce(operation: (acc: Long, Long) -> Long): Long { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10798,7 +10798,7 @@ public inline fun LongArray.reduce(operation: (Long, Long) -> Long): Long { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun FloatArray.reduce(operation: (Float, Float) -> Float): Float { +public inline fun FloatArray.reduce(operation: (acc: Float, Float) -> Float): Float { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10811,7 +10811,7 @@ public inline fun FloatArray.reduce(operation: (Float, Float) -> Float): Float { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun DoubleArray.reduce(operation: (Double, Double) -> Double): Double { +public inline fun DoubleArray.reduce(operation: (acc: Double, Double) -> Double): Double { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10824,7 +10824,7 @@ public inline fun DoubleArray.reduce(operation: (Double, Double) -> Double): Dou /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun BooleanArray.reduce(operation: (Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduce(operation: (acc: Boolean, Boolean) -> Boolean): Boolean { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10837,7 +10837,7 @@ public inline fun BooleanArray.reduce(operation: (Boolean, Boolean) -> Boolean): /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun CharArray.reduce(operation: (Char, Char) -> Char): Char { +public inline fun CharArray.reduce(operation: (acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10853,7 +10853,7 @@ public inline fun CharArray.reduce(operation: (Char, Char) -> Char): Char { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun Array.reduceIndexed(operation: (Int, S, T) -> S): S { +public inline fun Array.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = this[0] @@ -10869,7 +10869,7 @@ public inline fun Array.reduceIndexed(operation: (Int, S, T) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun ByteArray.reduceIndexed(operation: (Int, Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduceIndexed(operation: (index: Int, acc: Byte, Byte) -> Byte): Byte { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10885,7 +10885,7 @@ public inline fun ByteArray.reduceIndexed(operation: (Int, Byte, Byte) -> Byte): * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun ShortArray.reduceIndexed(operation: (Int, Short, Short) -> Short): Short { +public inline fun ShortArray.reduceIndexed(operation: (index: Int, acc: Short, Short) -> Short): Short { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10901,7 +10901,7 @@ public inline fun ShortArray.reduceIndexed(operation: (Int, Short, Short) -> Sho * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun IntArray.reduceIndexed(operation: (Int, Int, Int) -> Int): Int { +public inline fun IntArray.reduceIndexed(operation: (index: Int, acc: Int, Int) -> Int): Int { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10917,7 +10917,7 @@ public inline fun IntArray.reduceIndexed(operation: (Int, Int, Int) -> Int): Int * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun LongArray.reduceIndexed(operation: (Int, Long, Long) -> Long): Long { +public inline fun LongArray.reduceIndexed(operation: (index: Int, acc: Long, Long) -> Long): Long { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10933,7 +10933,7 @@ public inline fun LongArray.reduceIndexed(operation: (Int, Long, Long) -> Long): * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun FloatArray.reduceIndexed(operation: (Int, Float, Float) -> Float): Float { +public inline fun FloatArray.reduceIndexed(operation: (index: Int, acc: Float, Float) -> Float): Float { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10949,7 +10949,7 @@ public inline fun FloatArray.reduceIndexed(operation: (Int, Float, Float) -> Flo * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun DoubleArray.reduceIndexed(operation: (Int, Double, Double) -> Double): Double { +public inline fun DoubleArray.reduceIndexed(operation: (index: Int, acc: Double, Double) -> Double): Double { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10965,7 +10965,7 @@ public inline fun DoubleArray.reduceIndexed(operation: (Int, Double, Double) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun BooleanArray.reduceIndexed(operation: (Int, Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduceIndexed(operation: (index: Int, acc: Boolean, Boolean) -> Boolean): Boolean { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10981,7 +10981,7 @@ public inline fun BooleanArray.reduceIndexed(operation: (Int, Boolean, Boolean) * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun CharArray.reduceIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharArray.reduceIndexed(operation: (index: Int, acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10994,7 +10994,7 @@ public inline fun CharArray.reduceIndexed(operation: (Int, Char, Char) -> Char): /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun Array.reduceRight(operation: (T, S) -> S): S { +public inline fun Array.reduceRight(operation: (T, acc: S) -> S): S { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = get(index--) @@ -11007,7 +11007,7 @@ public inline fun Array.reduceRight(operation: (T, S) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduceRight(operation: (Byte, acc: Byte) -> Byte): Byte { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11020,7 +11020,7 @@ public inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte): Byte { /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short): Short { +public inline fun ShortArray.reduceRight(operation: (Short, acc: Short) -> Short): Short { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11033,7 +11033,7 @@ public inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short): Sh /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun IntArray.reduceRight(operation: (Int, Int) -> Int): Int { +public inline fun IntArray.reduceRight(operation: (Int, acc: Int) -> Int): Int { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11046,7 +11046,7 @@ public inline fun IntArray.reduceRight(operation: (Int, Int) -> Int): Int { /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun LongArray.reduceRight(operation: (Long, Long) -> Long): Long { +public inline fun LongArray.reduceRight(operation: (Long, acc: Long) -> Long): Long { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11059,7 +11059,7 @@ public inline fun LongArray.reduceRight(operation: (Long, Long) -> Long): Long { /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float): Float { +public inline fun FloatArray.reduceRight(operation: (Float, acc: Float) -> Float): Float { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11072,7 +11072,7 @@ public inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float): Fl /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double): Double { +public inline fun DoubleArray.reduceRight(operation: (Double, acc: Double) -> Double): Double { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11085,7 +11085,7 @@ public inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double) /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduceRight(operation: (Boolean, acc: Boolean) -> Boolean): Boolean { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11098,7 +11098,7 @@ public inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Bool /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): Char { +public inline fun CharArray.reduceRight(operation: (Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11114,7 +11114,7 @@ public inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): Char { * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun Array.reduceRightIndexed(operation: (Int, T, S) -> S): S { +public inline fun Array.reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = get(index--) @@ -11131,7 +11131,7 @@ public inline fun Array.reduceRightIndexed(operation: (Int, T, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ByteArray.reduceRightIndexed(operation: (Int, Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduceRightIndexed(operation: (index: Int, Byte, acc: Byte) -> Byte): Byte { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11148,7 +11148,7 @@ public inline fun ByteArray.reduceRightIndexed(operation: (Int, Byte, Byte) -> B * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ShortArray.reduceRightIndexed(operation: (Int, Short, Short) -> Short): Short { +public inline fun ShortArray.reduceRightIndexed(operation: (index: Int, Short, acc: Short) -> Short): Short { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11165,7 +11165,7 @@ public inline fun ShortArray.reduceRightIndexed(operation: (Int, Short, Short) - * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun IntArray.reduceRightIndexed(operation: (Int, Int, Int) -> Int): Int { +public inline fun IntArray.reduceRightIndexed(operation: (index: Int, Int, acc: Int) -> Int): Int { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11182,7 +11182,7 @@ public inline fun IntArray.reduceRightIndexed(operation: (Int, Int, Int) -> Int) * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun LongArray.reduceRightIndexed(operation: (Int, Long, Long) -> Long): Long { +public inline fun LongArray.reduceRightIndexed(operation: (index: Int, Long, acc: Long) -> Long): Long { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11199,7 +11199,7 @@ public inline fun LongArray.reduceRightIndexed(operation: (Int, Long, Long) -> L * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun FloatArray.reduceRightIndexed(operation: (Int, Float, Float) -> Float): Float { +public inline fun FloatArray.reduceRightIndexed(operation: (index: Int, Float, acc: Float) -> Float): Float { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11216,7 +11216,7 @@ public inline fun FloatArray.reduceRightIndexed(operation: (Int, Float, Float) - * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun DoubleArray.reduceRightIndexed(operation: (Int, Double, Double) -> Double): Double { +public inline fun DoubleArray.reduceRightIndexed(operation: (index: Int, Double, acc: Double) -> Double): Double { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11233,7 +11233,7 @@ public inline fun DoubleArray.reduceRightIndexed(operation: (Int, Double, Double * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun BooleanArray.reduceRightIndexed(operation: (Int, Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduceRightIndexed(operation: (index: Int, Boolean, acc: Boolean) -> Boolean): Boolean { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11250,7 +11250,7 @@ public inline fun BooleanArray.reduceRightIndexed(operation: (Int, Boolean, Bool * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharArray.reduceRightIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharArray.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11700,7 +11700,7 @@ 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. */ -public inline fun Array.zip(other: Array, transform: (T, R) -> V): List { +public inline fun Array.zip(other: Array, transform: (a: T, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11712,7 +11712,7 @@ public inline fun Array.zip(other: Array, transform: (T, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ByteArray.zip(other: Array, transform: (Byte, R) -> V): List { +public inline fun ByteArray.zip(other: Array, transform: (a: Byte, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11724,7 +11724,7 @@ public inline fun ByteArray.zip(other: Array, transform: (Byte, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ShortArray.zip(other: Array, transform: (Short, R) -> V): List { +public inline fun ShortArray.zip(other: Array, transform: (a: Short, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11736,7 +11736,7 @@ public inline fun ShortArray.zip(other: Array, transform: (Short, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun IntArray.zip(other: Array, transform: (Int, R) -> V): List { +public inline fun IntArray.zip(other: Array, transform: (a: Int, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11748,7 +11748,7 @@ public inline fun IntArray.zip(other: Array, transform: (Int, R) - /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun LongArray.zip(other: Array, transform: (Long, R) -> V): List { +public inline fun LongArray.zip(other: Array, transform: (a: Long, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11760,7 +11760,7 @@ public inline fun LongArray.zip(other: Array, transform: (Long, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun FloatArray.zip(other: Array, transform: (Float, R) -> V): List { +public inline fun FloatArray.zip(other: Array, transform: (a: Float, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11772,7 +11772,7 @@ public inline fun FloatArray.zip(other: Array, transform: (Float, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun DoubleArray.zip(other: Array, transform: (Double, R) -> V): List { +public inline fun DoubleArray.zip(other: Array, transform: (a: Double, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11784,7 +11784,7 @@ public inline fun DoubleArray.zip(other: Array, transform: (Double /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun BooleanArray.zip(other: Array, transform: (Boolean, R) -> V): List { +public inline fun BooleanArray.zip(other: Array, transform: (a: Boolean, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11796,7 +11796,7 @@ public inline fun BooleanArray.zip(other: Array, transform: (Boole /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun CharArray.zip(other: Array, transform: (Char, R) -> V): List { +public inline fun CharArray.zip(other: Array, transform: (a: Char, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11871,7 +11871,7 @@ 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. */ -public inline fun Array.zip(other: Iterable, transform: (T, R) -> V): List { +public inline fun Array.zip(other: Iterable, transform: (a: T, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11885,7 +11885,7 @@ public inline fun Array.zip(other: Iterable, transform: (T, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ByteArray.zip(other: Iterable, transform: (Byte, R) -> V): List { +public inline fun ByteArray.zip(other: Iterable, transform: (a: Byte, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11899,7 +11899,7 @@ public inline fun ByteArray.zip(other: Iterable, transform: (Byte, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ShortArray.zip(other: Iterable, transform: (Short, R) -> V): List { +public inline fun ShortArray.zip(other: Iterable, transform: (a: Short, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11913,7 +11913,7 @@ public inline fun ShortArray.zip(other: Iterable, transform: (Short, R /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun IntArray.zip(other: Iterable, transform: (Int, R) -> V): List { +public inline fun IntArray.zip(other: Iterable, transform: (a: Int, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11927,7 +11927,7 @@ public inline fun IntArray.zip(other: Iterable, transform: (Int, R) -> /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun LongArray.zip(other: Iterable, transform: (Long, R) -> V): List { +public inline fun LongArray.zip(other: Iterable, transform: (a: Long, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11941,7 +11941,7 @@ public inline fun LongArray.zip(other: Iterable, transform: (Long, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun FloatArray.zip(other: Iterable, transform: (Float, R) -> V): List { +public inline fun FloatArray.zip(other: Iterable, transform: (a: Float, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11955,7 +11955,7 @@ public inline fun FloatArray.zip(other: Iterable, transform: (Float, R /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun DoubleArray.zip(other: Iterable, transform: (Double, R) -> V): List { +public inline fun DoubleArray.zip(other: Iterable, transform: (a: Double, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11969,7 +11969,7 @@ public inline fun DoubleArray.zip(other: Iterable, transform: (Double, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun BooleanArray.zip(other: Iterable, transform: (Boolean, R) -> V): List { +public inline fun BooleanArray.zip(other: Iterable, transform: (a: Boolean, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11983,7 +11983,7 @@ public inline fun BooleanArray.zip(other: Iterable, transform: (Boolea /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun CharArray.zip(other: Iterable, transform: (Char, R) -> V): List { +public inline fun CharArray.zip(other: Iterable, transform: (a: Char, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12053,7 +12053,7 @@ 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. */ -public inline fun ByteArray.zip(other: ByteArray, transform: (Byte, Byte) -> V): List { +public inline fun ByteArray.zip(other: ByteArray, transform: (a: Byte, b: Byte) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12065,7 +12065,7 @@ public inline fun ByteArray.zip(other: ByteArray, transform: (Byte, Byte) -> /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ShortArray.zip(other: ShortArray, transform: (Short, Short) -> V): List { +public inline fun ShortArray.zip(other: ShortArray, transform: (a: Short, b: Short) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12077,7 +12077,7 @@ public inline fun ShortArray.zip(other: ShortArray, transform: (Short, Short /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun IntArray.zip(other: IntArray, transform: (Int, Int) -> V): List { +public inline fun IntArray.zip(other: IntArray, transform: (a: Int, b: Int) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12089,7 +12089,7 @@ public inline fun IntArray.zip(other: IntArray, transform: (Int, Int) -> V): /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun LongArray.zip(other: LongArray, transform: (Long, Long) -> V): List { +public inline fun LongArray.zip(other: LongArray, transform: (a: Long, b: Long) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12101,7 +12101,7 @@ public inline fun LongArray.zip(other: LongArray, transform: (Long, Long) -> /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun FloatArray.zip(other: FloatArray, transform: (Float, Float) -> V): List { +public inline fun FloatArray.zip(other: FloatArray, transform: (a: Float, b: Float) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12113,7 +12113,7 @@ public inline fun FloatArray.zip(other: FloatArray, transform: (Float, Float /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun DoubleArray.zip(other: DoubleArray, transform: (Double, Double) -> V): List { +public inline fun DoubleArray.zip(other: DoubleArray, transform: (a: Double, b: Double) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12125,7 +12125,7 @@ public inline fun DoubleArray.zip(other: DoubleArray, transform: (Double, Do /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun BooleanArray.zip(other: BooleanArray, transform: (Boolean, Boolean) -> V): List { +public inline fun BooleanArray.zip(other: BooleanArray, transform: (a: Boolean, b: Boolean) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12137,7 +12137,7 @@ public inline fun BooleanArray.zip(other: BooleanArray, transform: (Boolean, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun CharArray.zip(other: CharArray, transform: (Char, Char) -> V): List { +public inline fun CharArray.zip(other: CharArray, transform: (a: Char, b: Char) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -13500,56 +13500,56 @@ public fun CharArray.toTypedArray(): Array { /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun Array.sort(noinline comparison: (T, T) -> Int): Unit { +public inline fun Array.sort(noinline comparison: (a: T, b: T) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun ByteArray.sort(noinline comparison: (Byte, Byte) -> Int): Unit { +public inline fun ByteArray.sort(noinline comparison: (a: Byte, b: Byte) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun ShortArray.sort(noinline comparison: (Short, Short) -> Int): Unit { +public inline fun ShortArray.sort(noinline comparison: (a: Short, b: Short) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun IntArray.sort(noinline comparison: (Int, Int) -> Int): Unit { +public inline fun IntArray.sort(noinline comparison: (a: Int, b: Int) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun LongArray.sort(noinline comparison: (Long, Long) -> Int): Unit { +public inline fun LongArray.sort(noinline comparison: (a: Long, b: Long) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun FloatArray.sort(noinline comparison: (Float, Float) -> Int): Unit { +public inline fun FloatArray.sort(noinline comparison: (a: Float, b: Float) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun DoubleArray.sort(noinline comparison: (Double, Double) -> Int): Unit { +public inline fun DoubleArray.sort(noinline comparison: (a: Double, b: Double) -> Int): Unit { asDynamic().sort(comparison) } /** * Sorts the array in-place according to the order specified by the given [comparison] function. */ -public inline fun CharArray.sort(noinline comparison: (Char, Char) -> Int): Unit { +public inline fun CharArray.sort(noinline comparison: (a: Char, b: Char) -> Int): Unit { asDynamic().sort(comparison) } diff --git a/js/js.libraries/src/core/generated/_CollectionsJs.kt b/js/js.libraries/src/core/generated/_CollectionsJs.kt index 17fa184d739..749e33a2f6d 100644 --- a/js/js.libraries/src/core/generated/_CollectionsJs.kt +++ b/js/js.libraries/src/core/generated/_CollectionsJs.kt @@ -616,7 +616,7 @@ public inline fun Iterable.filter(predicate: (T) -> Boolean): List { * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun Iterable.filterIndexed(predicate: (Int, T) -> Boolean): List { +public inline fun Iterable.filterIndexed(predicate: (index: Int, T) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -625,7 +625,7 @@ public inline fun Iterable.filterIndexed(predicate: (Int, T) -> Boolean): * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > Iterable.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C { +public inline fun > Iterable.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -1207,7 +1207,7 @@ public inline fun Iterable.map(transform: (T) -> R): List { * and returns the result of the transform applied to the element. */ @Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE") -public inline fun Iterable.mapIndexed(transform: (Int, T) -> R): List { +public inline fun Iterable.mapIndexed(transform: (index: Int, T) -> R): List { return mapIndexedTo(ArrayList(collectionSizeOrDefault(10)), transform) } @@ -1217,7 +1217,7 @@ public inline fun Iterable.mapIndexed(transform: (Int, T) -> R): List< * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun Iterable.mapIndexedNotNull(transform: (Int, T) -> R?): List { +public inline fun Iterable.mapIndexedNotNull(transform: (index: Int, T) -> R?): List { return mapIndexedNotNullTo(ArrayList(), transform) } @@ -1227,7 +1227,7 @@ public inline fun Iterable.mapIndexedNotNull(transform: (Int, T) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Iterable.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C { +public inline fun > Iterable.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -1238,7 +1238,7 @@ public inline fun > Iterable.mapIndex * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Iterable.mapIndexedTo(destination: C, transform: (Int, T) -> R): C { +public inline fun > Iterable.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -1405,7 +1405,7 @@ public inline fun Iterable.count(predicate: (T) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Iterable.fold(initial: R, operation: (R, T) -> R): R { +public inline fun Iterable.fold(initial: R, operation: (acc: R, T) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -1417,7 +1417,7 @@ public inline fun Iterable.fold(initial: R, operation: (R, T) -> R): R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun Iterable.foldIndexed(initial: R, operation: (Int, R, T) -> R): R { +public inline fun Iterable.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -1427,7 +1427,7 @@ public inline fun Iterable.foldIndexed(initial: R, operation: (Int, R, /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun List.foldRight(initial: R, operation: (T, R) -> R): R { +public inline fun List.foldRight(initial: R, operation: (T, acc: R) -> R): R { var accumulator = initial if (!isEmpty()) { val iterator = listIterator(size) @@ -1444,7 +1444,7 @@ public inline fun List.foldRight(initial: R, operation: (T, R) -> R): * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun List.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R { +public inline fun List.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R { var accumulator = initial if (!isEmpty()) { val iterator = listIterator(size) @@ -1469,7 +1469,7 @@ public inline fun Iterable.forEach(action: (T) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun Iterable.forEachIndexed(action: (Int, T) -> Unit): Unit { +public inline fun Iterable.forEachIndexed(action: (index: Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -1671,7 +1671,7 @@ public inline fun > C.onEach(action: (T) -> Unit): C { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Iterable.reduce(operation: (S, T) -> S): S { +public inline fun Iterable.reduce(operation: (acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty collection can't be reduced.") var accumulator: S = iterator.next() @@ -1687,7 +1687,7 @@ public inline fun Iterable.reduce(operation: (S, T) -> S): S { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun Iterable.reduceIndexed(operation: (Int, S, T) -> S): S { +public inline fun Iterable.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty collection can't be reduced.") var index = 1 @@ -1701,7 +1701,7 @@ public inline fun Iterable.reduceIndexed(operation: (Int, S, T) -> /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun List.reduceRight(operation: (T, S) -> S): S { +public inline fun List.reduceRight(operation: (T, acc: S) -> S): S { val iterator = listIterator(size) if (!iterator.hasPrevious()) throw UnsupportedOperationException("Empty list can't be reduced.") @@ -1718,7 +1718,7 @@ public inline fun List.reduceRight(operation: (T, S) -> S): S { * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun List.reduceRightIndexed(operation: (Int, T, S) -> S): S { +public inline fun List.reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S { val iterator = listIterator(size) if (!iterator.hasPrevious()) throw UnsupportedOperationException("Empty list can't be reduced.") @@ -1957,7 +1957,7 @@ 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. */ -public inline fun Iterable.zip(other: Array, transform: (T, R) -> V): List { +public inline fun Iterable.zip(other: Array, transform: (a: T, b: R) -> V): List { val arraySize = other.size val list = ArrayList(minOf(collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -1978,7 +1978,7 @@ 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. */ -public inline fun Iterable.zip(other: Iterable, transform: (T, R) -> V): List { +public inline fun Iterable.zip(other: Iterable, transform: (a: T, b: R) -> V): List { val first = iterator() val second = other.iterator() val list = ArrayList(minOf(collectionSizeOrDefault(10), other.collectionSizeOrDefault(10))) diff --git a/js/js.libraries/src/core/generated/_SequencesJs.kt b/js/js.libraries/src/core/generated/_SequencesJs.kt index 890faacf2b4..a12582d9bf6 100644 --- a/js/js.libraries/src/core/generated/_SequencesJs.kt +++ b/js/js.libraries/src/core/generated/_SequencesJs.kt @@ -312,7 +312,7 @@ public fun Sequence.filter(predicate: (T) -> Boolean): Sequence { * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public fun Sequence.filterIndexed(predicate: (Int, T) -> Boolean): Sequence { +public fun Sequence.filterIndexed(predicate: (index: Int, T) -> Boolean): Sequence { // TODO: Rewrite with generalized MapFilterIndexingSequence return TransformingSequence(FilteringSequence(IndexingSequence(this), true, { predicate(it.index, it.value) }), { it.value }) } @@ -322,7 +322,7 @@ public fun Sequence.filterIndexed(predicate: (Int, T) -> Boolean): Sequen * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > Sequence.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C { +public inline fun > Sequence.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -670,7 +670,7 @@ public fun Sequence.map(transform: (T) -> R): Sequence { * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public fun Sequence.mapIndexed(transform: (Int, T) -> R): Sequence { +public fun Sequence.mapIndexed(transform: (index: Int, T) -> R): Sequence { return TransformingIndexedSequence(this, transform) } @@ -680,7 +680,7 @@ public fun Sequence.mapIndexed(transform: (Int, T) -> R): Sequence * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public fun Sequence.mapIndexedNotNull(transform: (Int, T) -> R?): Sequence { +public fun Sequence.mapIndexedNotNull(transform: (index: Int, T) -> R?): Sequence { return TransformingIndexedSequence(this, transform).filterNotNull() } @@ -690,7 +690,7 @@ public fun Sequence.mapIndexedNotNull(transform: (Int, T) -> R?) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C { +public inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -701,7 +701,7 @@ public inline fun > Sequence.mapIndex * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Sequence.mapIndexedTo(destination: C, transform: (Int, T) -> R): C { +public inline fun > Sequence.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -817,7 +817,7 @@ public inline fun Sequence.count(predicate: (T) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Sequence.fold(initial: R, operation: (R, T) -> R): R { +public inline fun Sequence.fold(initial: R, operation: (acc: R, T) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -829,7 +829,7 @@ public inline fun Sequence.fold(initial: R, operation: (R, T) -> R): R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun Sequence.foldIndexed(initial: R, operation: (Int, R, T) -> R): R { +public inline fun Sequence.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -848,7 +848,7 @@ public inline fun Sequence.forEach(action: (T) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun Sequence.forEachIndexed(action: (Int, T) -> Unit): Unit { +public inline fun Sequence.forEachIndexed(action: (index: Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -1053,7 +1053,7 @@ public fun Sequence.onEach(action: (T) -> Unit): Sequence { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Sequence.reduce(operation: (S, T) -> S): S { +public inline fun Sequence.reduce(operation: (acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty sequence can't be reduced.") var accumulator: S = iterator.next() @@ -1069,7 +1069,7 @@ public inline fun Sequence.reduce(operation: (S, T) -> S): S { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun Sequence.reduceIndexed(operation: (Int, S, T) -> S): S { +public inline fun Sequence.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty sequence can't be reduced.") var index = 1 @@ -1255,7 +1255,7 @@ public infix fun Sequence.zip(other: Sequence): Sequence /** * 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. */ -public fun Sequence.zip(other: Sequence, transform: (T, R) -> V): Sequence { +public fun Sequence.zip(other: Sequence, transform: (a: T, b: R) -> V): Sequence { return MergingSequence(this, other, transform) } diff --git a/js/js.libraries/src/core/generated/_StringsJs.kt b/js/js.libraries/src/core/generated/_StringsJs.kt index 66511b0fdee..0c4e72c4bdf 100644 --- a/js/js.libraries/src/core/generated/_StringsJs.kt +++ b/js/js.libraries/src/core/generated/_StringsJs.kt @@ -306,7 +306,7 @@ public inline fun String.filter(predicate: (Char) -> Boolean): String { * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public inline fun CharSequence.filterIndexed(predicate: (Int, Char) -> Boolean): CharSequence { +public inline fun CharSequence.filterIndexed(predicate: (index: Int, Char) -> Boolean): CharSequence { return filterIndexedTo(StringBuilder(), predicate) } @@ -315,7 +315,7 @@ public inline fun CharSequence.filterIndexed(predicate: (Int, Char) -> Boolean): * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public inline fun String.filterIndexed(predicate: (Int, Char) -> Boolean): String { +public inline fun String.filterIndexed(predicate: (index: Int, Char) -> Boolean): String { return filterIndexedTo(StringBuilder(), predicate).toString() } @@ -324,7 +324,7 @@ public inline fun String.filterIndexed(predicate: (Int, Char) -> Boolean): Strin * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public inline fun CharSequence.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C { +public inline fun CharSequence.filterIndexedTo(destination: C, predicate: (index: Int, Char) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.append(element) } @@ -727,7 +727,7 @@ public inline fun CharSequence.map(transform: (Char) -> R): List { * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun CharSequence.mapIndexed(transform: (Int, Char) -> R): List { +public inline fun CharSequence.mapIndexed(transform: (index: Int, Char) -> R): List { return mapIndexedTo(ArrayList(length), transform) } @@ -737,7 +737,7 @@ public inline fun CharSequence.mapIndexed(transform: (Int, Char) -> R): List * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun CharSequence.mapIndexedNotNull(transform: (Int, Char) -> R?): List { +public inline fun CharSequence.mapIndexedNotNull(transform: (index: Int, Char) -> R?): List { return mapIndexedNotNullTo(ArrayList(), transform) } @@ -747,7 +747,7 @@ public inline fun CharSequence.mapIndexedNotNull(transform: (Int, Char * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun > CharSequence.mapIndexedNotNullTo(destination: C, transform: (Int, Char) -> R?): C { +public inline fun > CharSequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, Char) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -758,7 +758,7 @@ public inline fun > CharSequence.mapIndexed * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun > CharSequence.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C { +public inline fun > CharSequence.mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -843,7 +843,7 @@ public inline fun CharSequence.count(predicate: (Char) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each character. */ -public inline fun CharSequence.fold(initial: R, operation: (R, Char) -> R): R { +public inline fun CharSequence.fold(initial: R, operation: (acc: R, Char) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -855,7 +855,7 @@ public inline fun CharSequence.fold(initial: R, operation: (R, Char) -> R): * @param [operation] function that takes the index of a character, current accumulator value * and the character itself, and calculates the next accumulator value. */ -public inline fun CharSequence.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R { +public inline fun CharSequence.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -865,7 +865,7 @@ public inline fun CharSequence.foldIndexed(initial: R, operation: (Int, R, C /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each character and current accumulator value. */ -public inline fun CharSequence.foldRight(initial: R, operation: (Char, R) -> R): R { +public inline fun CharSequence.foldRight(initial: R, operation: (Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -880,7 +880,7 @@ public inline fun CharSequence.foldRight(initial: R, operation: (Char, R) -> * @param [operation] function that takes the index of a character, the character itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharSequence.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R { +public inline fun CharSequence.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -902,7 +902,7 @@ public inline fun CharSequence.forEach(action: (Char) -> Unit): Unit { * @param [action] function that takes the index of a character and the character itself * and performs the desired action on the character. */ -public inline fun CharSequence.forEachIndexed(action: (Int, Char) -> Unit): Unit { +public inline fun CharSequence.forEachIndexed(action: (index: Int, Char) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -1022,7 +1022,7 @@ public inline fun S.onEach(action: (Char) -> Unit): S { /** * Accumulates value starting with the first character and applying [operation] from left to right to current accumulator value and each character. */ -public inline fun CharSequence.reduce(operation: (Char, Char) -> Char): Char { +public inline fun CharSequence.reduce(operation: (acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = this[0] @@ -1038,7 +1038,7 @@ public inline fun CharSequence.reduce(operation: (Char, Char) -> Char): Char { * @param [operation] function that takes the index of a character, current accumulator value * and the character itself and calculates the next accumulator value. */ -public inline fun CharSequence.reduceIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharSequence.reduceIndexed(operation: (index: Int, acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = this[0] @@ -1051,7 +1051,7 @@ public inline fun CharSequence.reduceIndexed(operation: (Int, Char, Char) -> Cha /** * Accumulates value starting with last character and applying [operation] from right to left to each character and current accumulator value. */ -public inline fun CharSequence.reduceRight(operation: (Char, Char) -> Char): Char { +public inline fun CharSequence.reduceRight(operation: (Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = get(index--) @@ -1067,7 +1067,7 @@ public inline fun CharSequence.reduceRight(operation: (Char, Char) -> Char): Cha * @param [operation] function that takes the index of a character, the character itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharSequence.reduceRightIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharSequence.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = get(index--) @@ -1146,7 +1146,7 @@ public infix fun CharSequence.zip(other: CharSequence): List> { /** * Returns a list of values built from characters of both char sequences with same indexes using provided [transform]. List has length of shortest char sequence. */ -public inline fun CharSequence.zip(other: CharSequence, transform: (Char, Char) -> V): List { +public inline fun CharSequence.zip(other: CharSequence, transform: (a: Char, b: Char) -> V): List { val length = minOf(this.length, other.length) val list = ArrayList(length) for (i in 0..length-1) { diff --git a/libraries/stdlib/common/src/generated/_Arrays.kt b/libraries/stdlib/common/src/generated/_Arrays.kt index fceb587059e..6fa3abbacf3 100644 --- a/libraries/stdlib/common/src/generated/_Arrays.kt +++ b/libraries/stdlib/common/src/generated/_Arrays.kt @@ -1680,126 +1680,126 @@ public header inline fun CharArray.filter(predicate: (Char) -> Boolean): List Array.filterIndexed(predicate: (Int, T) -> Boolean): List +public header inline fun Array.filterIndexed(predicate: (index: Int, T) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun ByteArray.filterIndexed(predicate: (Int, Byte) -> Boolean): List +public header inline fun ByteArray.filterIndexed(predicate: (index: Int, Byte) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun ShortArray.filterIndexed(predicate: (Int, Short) -> Boolean): List +public header inline fun ShortArray.filterIndexed(predicate: (index: Int, Short) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun IntArray.filterIndexed(predicate: (Int, Int) -> Boolean): List +public header inline fun IntArray.filterIndexed(predicate: (index: Int, Int) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun LongArray.filterIndexed(predicate: (Int, Long) -> Boolean): List +public header inline fun LongArray.filterIndexed(predicate: (index: Int, Long) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun FloatArray.filterIndexed(predicate: (Int, Float) -> Boolean): List +public header inline fun FloatArray.filterIndexed(predicate: (index: Int, Float) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun DoubleArray.filterIndexed(predicate: (Int, Double) -> Boolean): List +public header inline fun DoubleArray.filterIndexed(predicate: (index: Int, Double) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun BooleanArray.filterIndexed(predicate: (Int, Boolean) -> Boolean): List +public header inline fun BooleanArray.filterIndexed(predicate: (index: Int, Boolean) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun CharArray.filterIndexed(predicate: (Int, Char) -> Boolean): List +public header inline fun CharArray.filterIndexed(predicate: (index: Int, Char) -> Boolean): List /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > Array.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C +public header inline fun > Array.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > ByteArray.filterIndexedTo(destination: C, predicate: (Int, Byte) -> Boolean): C +public header inline fun > ByteArray.filterIndexedTo(destination: C, predicate: (index: Int, Byte) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > ShortArray.filterIndexedTo(destination: C, predicate: (Int, Short) -> Boolean): C +public header inline fun > ShortArray.filterIndexedTo(destination: C, predicate: (index: Int, Short) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > IntArray.filterIndexedTo(destination: C, predicate: (Int, Int) -> Boolean): C +public header inline fun > IntArray.filterIndexedTo(destination: C, predicate: (index: Int, Int) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > LongArray.filterIndexedTo(destination: C, predicate: (Int, Long) -> Boolean): C +public header inline fun > LongArray.filterIndexedTo(destination: C, predicate: (index: Int, Long) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > FloatArray.filterIndexedTo(destination: C, predicate: (Int, Float) -> Boolean): C +public header inline fun > FloatArray.filterIndexedTo(destination: C, predicate: (index: Int, Float) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > DoubleArray.filterIndexedTo(destination: C, predicate: (Int, Double) -> Boolean): C +public header inline fun > DoubleArray.filterIndexedTo(destination: C, predicate: (index: Int, Double) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > BooleanArray.filterIndexedTo(destination: C, predicate: (Int, Boolean) -> Boolean): C +public header inline fun > BooleanArray.filterIndexedTo(destination: C, predicate: (index: Int, Boolean) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > CharArray.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C +public header inline fun > CharArray.filterIndexedTo(destination: C, predicate: (index: Int, Char) -> Boolean): C /** * Returns a list containing all elements that are instances of specified type parameter R. @@ -4512,7 +4512,7 @@ public header inline fun CharArray.map(transform: (Char) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun Array.mapIndexed(transform: (Int, T) -> R): List +public header inline fun Array.mapIndexed(transform: (index: Int, T) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4520,7 +4520,7 @@ public header inline fun Array.mapIndexed(transform: (Int, T) -> R * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun ByteArray.mapIndexed(transform: (Int, Byte) -> R): List +public header inline fun ByteArray.mapIndexed(transform: (index: Int, Byte) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4528,7 +4528,7 @@ public header inline fun ByteArray.mapIndexed(transform: (Int, Byte) -> R): * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun ShortArray.mapIndexed(transform: (Int, Short) -> R): List +public header inline fun ShortArray.mapIndexed(transform: (index: Int, Short) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4536,7 +4536,7 @@ public header inline fun ShortArray.mapIndexed(transform: (Int, Short) -> R) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun IntArray.mapIndexed(transform: (Int, Int) -> R): List +public header inline fun IntArray.mapIndexed(transform: (index: Int, Int) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4544,7 +4544,7 @@ public header inline fun IntArray.mapIndexed(transform: (Int, Int) -> R): Li * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun LongArray.mapIndexed(transform: (Int, Long) -> R): List +public header inline fun LongArray.mapIndexed(transform: (index: Int, Long) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4552,7 +4552,7 @@ public header inline fun LongArray.mapIndexed(transform: (Int, Long) -> R): * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun FloatArray.mapIndexed(transform: (Int, Float) -> R): List +public header inline fun FloatArray.mapIndexed(transform: (index: Int, Float) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4560,7 +4560,7 @@ public header inline fun FloatArray.mapIndexed(transform: (Int, Float) -> R) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun DoubleArray.mapIndexed(transform: (Int, Double) -> R): List +public header inline fun DoubleArray.mapIndexed(transform: (index: Int, Double) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4568,7 +4568,7 @@ public header inline fun DoubleArray.mapIndexed(transform: (Int, Double) -> * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun BooleanArray.mapIndexed(transform: (Int, Boolean) -> R): List +public header inline fun BooleanArray.mapIndexed(transform: (index: Int, Boolean) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4576,7 +4576,7 @@ public header inline fun BooleanArray.mapIndexed(transform: (Int, Boolean) - * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun CharArray.mapIndexed(transform: (Int, Char) -> R): List +public header inline fun CharArray.mapIndexed(transform: (index: Int, Char) -> R): List /** * Returns a list containing only the non-null results of applying the given [transform] function @@ -4584,7 +4584,7 @@ public header inline fun CharArray.mapIndexed(transform: (Int, Char) -> R): * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun Array.mapIndexedNotNull(transform: (Int, T) -> R?): List +public header inline fun Array.mapIndexedNotNull(transform: (index: Int, T) -> R?): List /** * Applies the given [transform] function to each element and its index in the original array @@ -4592,7 +4592,7 @@ public header inline fun Array.mapIndexedNotNull(transform: * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > Array.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C +public header inline fun > Array.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4600,7 +4600,7 @@ public header inline fun > Array. * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > Array.mapIndexedTo(destination: C, transform: (Int, T) -> R): C +public header inline fun > Array.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4608,7 +4608,7 @@ public header inline fun > Array.mapInd * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > ByteArray.mapIndexedTo(destination: C, transform: (Int, Byte) -> R): C +public header inline fun > ByteArray.mapIndexedTo(destination: C, transform: (index: Int, Byte) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4616,7 +4616,7 @@ public header inline fun > ByteArray.mapIndexedTo * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > ShortArray.mapIndexedTo(destination: C, transform: (Int, Short) -> R): C +public header inline fun > ShortArray.mapIndexedTo(destination: C, transform: (index: Int, Short) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4624,7 +4624,7 @@ public header inline fun > ShortArray.mapIndexedT * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > IntArray.mapIndexedTo(destination: C, transform: (Int, Int) -> R): C +public header inline fun > IntArray.mapIndexedTo(destination: C, transform: (index: Int, Int) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4632,7 +4632,7 @@ public header inline fun > IntArray.mapIndexedTo( * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > LongArray.mapIndexedTo(destination: C, transform: (Int, Long) -> R): C +public header inline fun > LongArray.mapIndexedTo(destination: C, transform: (index: Int, Long) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4640,7 +4640,7 @@ public header inline fun > LongArray.mapIndexedTo * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > FloatArray.mapIndexedTo(destination: C, transform: (Int, Float) -> R): C +public header inline fun > FloatArray.mapIndexedTo(destination: C, transform: (index: Int, Float) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4648,7 +4648,7 @@ public header inline fun > FloatArray.mapIndexedT * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > DoubleArray.mapIndexedTo(destination: C, transform: (Int, Double) -> R): C +public header inline fun > DoubleArray.mapIndexedTo(destination: C, transform: (index: Int, Double) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4656,7 +4656,7 @@ public header inline fun > DoubleArray.mapIndexed * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > BooleanArray.mapIndexedTo(destination: C, transform: (Int, Boolean) -> R): C +public header inline fun > BooleanArray.mapIndexedTo(destination: C, transform: (index: Int, Boolean) -> R): C /** * Applies the given [transform] function to each element and its index in the original array @@ -4664,7 +4664,7 @@ public header inline fun > BooleanArray.mapIndexe * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > CharArray.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C +public header inline fun > CharArray.mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C /** * Returns a list containing only the non-null results of applying the given [transform] function @@ -5419,47 +5419,47 @@ public header inline fun CharArray.count(predicate: (Char) -> Boolean): Int /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun Array.fold(initial: R, operation: (R, T) -> R): R +public header inline fun Array.fold(initial: R, operation: (acc: R, T) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun ByteArray.fold(initial: R, operation: (R, Byte) -> R): R +public header inline fun ByteArray.fold(initial: R, operation: (acc: R, Byte) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun ShortArray.fold(initial: R, operation: (R, Short) -> R): R +public header inline fun ShortArray.fold(initial: R, operation: (acc: R, Short) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun IntArray.fold(initial: R, operation: (R, Int) -> R): R +public header inline fun IntArray.fold(initial: R, operation: (acc: R, Int) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun LongArray.fold(initial: R, operation: (R, Long) -> R): R +public header inline fun LongArray.fold(initial: R, operation: (acc: R, Long) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun FloatArray.fold(initial: R, operation: (R, Float) -> R): R +public header inline fun FloatArray.fold(initial: R, operation: (acc: R, Float) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun DoubleArray.fold(initial: R, operation: (R, Double) -> R): R +public header inline fun DoubleArray.fold(initial: R, operation: (acc: R, Double) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun BooleanArray.fold(initial: R, operation: (R, Boolean) -> R): R +public header inline fun BooleanArray.fold(initial: R, operation: (acc: R, Boolean) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun CharArray.fold(initial: R, operation: (R, Char) -> R): R +public header inline fun CharArray.fold(initial: R, operation: (acc: R, Char) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5467,7 +5467,7 @@ public header inline fun CharArray.fold(initial: R, operation: (R, Char) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun Array.foldIndexed(initial: R, operation: (Int, R, T) -> R): R +public header inline fun Array.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5475,7 +5475,7 @@ public header inline fun Array.foldIndexed(initial: R, operation: * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun ByteArray.foldIndexed(initial: R, operation: (Int, R, Byte) -> R): R +public header inline fun ByteArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Byte) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5483,7 +5483,7 @@ public header inline fun ByteArray.foldIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun ShortArray.foldIndexed(initial: R, operation: (Int, R, Short) -> R): R +public header inline fun ShortArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Short) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5491,7 +5491,7 @@ public header inline fun ShortArray.foldIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun IntArray.foldIndexed(initial: R, operation: (Int, R, Int) -> R): R +public header inline fun IntArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Int) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5499,7 +5499,7 @@ public header inline fun IntArray.foldIndexed(initial: R, operation: (Int, R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun LongArray.foldIndexed(initial: R, operation: (Int, R, Long) -> R): R +public header inline fun LongArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Long) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5507,7 +5507,7 @@ public header inline fun LongArray.foldIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun FloatArray.foldIndexed(initial: R, operation: (Int, R, Float) -> R): R +public header inline fun FloatArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Float) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5515,7 +5515,7 @@ public header inline fun FloatArray.foldIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun DoubleArray.foldIndexed(initial: R, operation: (Int, R, Double) -> R): R +public header inline fun DoubleArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Double) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5523,7 +5523,7 @@ public header inline fun DoubleArray.foldIndexed(initial: R, operation: (Int * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun BooleanArray.foldIndexed(initial: R, operation: (Int, R, Boolean) -> R): R +public header inline fun BooleanArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Boolean) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -5531,52 +5531,52 @@ public header inline fun BooleanArray.foldIndexed(initial: R, operation: (In * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun CharArray.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R +public header inline fun CharArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun Array.foldRight(initial: R, operation: (T, R) -> R): R +public header inline fun Array.foldRight(initial: R, operation: (T, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun ByteArray.foldRight(initial: R, operation: (Byte, R) -> R): R +public header inline fun ByteArray.foldRight(initial: R, operation: (Byte, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun ShortArray.foldRight(initial: R, operation: (Short, R) -> R): R +public header inline fun ShortArray.foldRight(initial: R, operation: (Short, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun IntArray.foldRight(initial: R, operation: (Int, R) -> R): R +public header inline fun IntArray.foldRight(initial: R, operation: (Int, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun LongArray.foldRight(initial: R, operation: (Long, R) -> R): R +public header inline fun LongArray.foldRight(initial: R, operation: (Long, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun FloatArray.foldRight(initial: R, operation: (Float, R) -> R): R +public header inline fun FloatArray.foldRight(initial: R, operation: (Float, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun DoubleArray.foldRight(initial: R, operation: (Double, R) -> R): R +public header inline fun DoubleArray.foldRight(initial: R, operation: (Double, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, R) -> R): R +public header inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun CharArray.foldRight(initial: R, operation: (Char, R) -> R): R +public header inline fun CharArray.foldRight(initial: R, operation: (Char, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5584,7 +5584,7 @@ public header inline fun CharArray.foldRight(initial: R, operation: (Char, R * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun Array.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R +public header inline fun Array.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5592,7 +5592,7 @@ public header inline fun Array.foldRightIndexed(initial: R, operat * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun ByteArray.foldRightIndexed(initial: R, operation: (Int, Byte, R) -> R): R +public header inline fun ByteArray.foldRightIndexed(initial: R, operation: (index: Int, Byte, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5600,7 +5600,7 @@ public header inline fun ByteArray.foldRightIndexed(initial: R, operation: ( * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun ShortArray.foldRightIndexed(initial: R, operation: (Int, Short, R) -> R): R +public header inline fun ShortArray.foldRightIndexed(initial: R, operation: (index: Int, Short, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5608,7 +5608,7 @@ public header inline fun ShortArray.foldRightIndexed(initial: R, operation: * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun IntArray.foldRightIndexed(initial: R, operation: (Int, Int, R) -> R): R +public header inline fun IntArray.foldRightIndexed(initial: R, operation: (index: Int, Int, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5616,7 +5616,7 @@ public header inline fun IntArray.foldRightIndexed(initial: R, operation: (I * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun LongArray.foldRightIndexed(initial: R, operation: (Int, Long, R) -> R): R +public header inline fun LongArray.foldRightIndexed(initial: R, operation: (index: Int, Long, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5624,7 +5624,7 @@ public header inline fun LongArray.foldRightIndexed(initial: R, operation: ( * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun FloatArray.foldRightIndexed(initial: R, operation: (Int, Float, R) -> R): R +public header inline fun FloatArray.foldRightIndexed(initial: R, operation: (index: Int, Float, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5632,7 +5632,7 @@ public header inline fun FloatArray.foldRightIndexed(initial: R, operation: * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun DoubleArray.foldRightIndexed(initial: R, operation: (Int, Double, R) -> R): R +public header inline fun DoubleArray.foldRightIndexed(initial: R, operation: (index: Int, Double, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5640,7 +5640,7 @@ public header inline fun DoubleArray.foldRightIndexed(initial: R, operation: * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun BooleanArray.foldRightIndexed(initial: R, operation: (Int, Boolean, R) -> R): R +public header inline fun BooleanArray.foldRightIndexed(initial: R, operation: (index: Int, Boolean, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -5648,7 +5648,7 @@ public header inline fun BooleanArray.foldRightIndexed(initial: R, operation * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun CharArray.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R +public header inline fun CharArray.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R /** * Performs the given [action] on each element. @@ -5700,63 +5700,63 @@ public header inline fun CharArray.forEach(action: (Char) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun Array.forEachIndexed(action: (Int, T) -> Unit): Unit +public header inline fun Array.forEachIndexed(action: (index: Int, T) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun ByteArray.forEachIndexed(action: (Int, Byte) -> Unit): Unit +public header inline fun ByteArray.forEachIndexed(action: (index: Int, Byte) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun ShortArray.forEachIndexed(action: (Int, Short) -> Unit): Unit +public header inline fun ShortArray.forEachIndexed(action: (index: Int, Short) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun IntArray.forEachIndexed(action: (Int, Int) -> Unit): Unit +public header inline fun IntArray.forEachIndexed(action: (index: Int, Int) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun LongArray.forEachIndexed(action: (Int, Long) -> Unit): Unit +public header inline fun LongArray.forEachIndexed(action: (index: Int, Long) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun FloatArray.forEachIndexed(action: (Int, Float) -> Unit): Unit +public header inline fun FloatArray.forEachIndexed(action: (index: Int, Float) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun DoubleArray.forEachIndexed(action: (Int, Double) -> Unit): Unit +public header inline fun DoubleArray.forEachIndexed(action: (index: Int, Double) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun BooleanArray.forEachIndexed(action: (Int, Boolean) -> Unit): Unit +public header inline fun BooleanArray.forEachIndexed(action: (index: Int, Boolean) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun CharArray.forEachIndexed(action: (Int, Char) -> Unit): Unit +public header inline fun CharArray.forEachIndexed(action: (index: Int, Char) -> Unit): Unit /** * Returns the largest element or `null` if there are no elements. @@ -6151,47 +6151,47 @@ public header inline fun CharArray.none(predicate: (Char) -> Boolean): Boolean /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun Array.reduce(operation: (S, T) -> S): S +public header inline fun Array.reduce(operation: (acc: S, T) -> S): S /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun ByteArray.reduce(operation: (Byte, Byte) -> Byte): Byte +public header inline fun ByteArray.reduce(operation: (acc: Byte, Byte) -> Byte): Byte /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun ShortArray.reduce(operation: (Short, Short) -> Short): Short +public header inline fun ShortArray.reduce(operation: (acc: Short, Short) -> Short): Short /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun IntArray.reduce(operation: (Int, Int) -> Int): Int +public header inline fun IntArray.reduce(operation: (acc: Int, Int) -> Int): Int /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun LongArray.reduce(operation: (Long, Long) -> Long): Long +public header inline fun LongArray.reduce(operation: (acc: Long, Long) -> Long): Long /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun FloatArray.reduce(operation: (Float, Float) -> Float): Float +public header inline fun FloatArray.reduce(operation: (acc: Float, Float) -> Float): Float /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun DoubleArray.reduce(operation: (Double, Double) -> Double): Double +public header inline fun DoubleArray.reduce(operation: (acc: Double, Double) -> Double): Double /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun BooleanArray.reduce(operation: (Boolean, Boolean) -> Boolean): Boolean +public header inline fun BooleanArray.reduce(operation: (acc: Boolean, Boolean) -> Boolean): Boolean /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun CharArray.reduce(operation: (Char, Char) -> Char): Char +public header inline fun CharArray.reduce(operation: (acc: Char, Char) -> Char): Char /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6199,7 +6199,7 @@ public header inline fun CharArray.reduce(operation: (Char, Char) -> Char): Char * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun Array.reduceIndexed(operation: (Int, S, T) -> S): S +public header inline fun Array.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6207,7 +6207,7 @@ public header inline fun Array.reduceIndexed(operation: (Int, S * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun ByteArray.reduceIndexed(operation: (Int, Byte, Byte) -> Byte): Byte +public header inline fun ByteArray.reduceIndexed(operation: (index: Int, acc: Byte, Byte) -> Byte): Byte /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6215,7 +6215,7 @@ public header inline fun ByteArray.reduceIndexed(operation: (Int, Byte, Byte) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun ShortArray.reduceIndexed(operation: (Int, Short, Short) -> Short): Short +public header inline fun ShortArray.reduceIndexed(operation: (index: Int, acc: Short, Short) -> Short): Short /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6223,7 +6223,7 @@ public header inline fun ShortArray.reduceIndexed(operation: (Int, Short, Short) * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun IntArray.reduceIndexed(operation: (Int, Int, Int) -> Int): Int +public header inline fun IntArray.reduceIndexed(operation: (index: Int, acc: Int, Int) -> Int): Int /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6231,7 +6231,7 @@ public header inline fun IntArray.reduceIndexed(operation: (Int, Int, Int) -> In * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun LongArray.reduceIndexed(operation: (Int, Long, Long) -> Long): Long +public header inline fun LongArray.reduceIndexed(operation: (index: Int, acc: Long, Long) -> Long): Long /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6239,7 +6239,7 @@ public header inline fun LongArray.reduceIndexed(operation: (Int, Long, Long) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun FloatArray.reduceIndexed(operation: (Int, Float, Float) -> Float): Float +public header inline fun FloatArray.reduceIndexed(operation: (index: Int, acc: Float, Float) -> Float): Float /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6247,7 +6247,7 @@ public header inline fun FloatArray.reduceIndexed(operation: (Int, Float, Float) * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun DoubleArray.reduceIndexed(operation: (Int, Double, Double) -> Double): Double +public header inline fun DoubleArray.reduceIndexed(operation: (index: Int, acc: Double, Double) -> Double): Double /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6255,7 +6255,7 @@ public header inline fun DoubleArray.reduceIndexed(operation: (Int, Double, Doub * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun BooleanArray.reduceIndexed(operation: (Int, Boolean, Boolean) -> Boolean): Boolean +public header inline fun BooleanArray.reduceIndexed(operation: (index: Int, acc: Boolean, Boolean) -> Boolean): Boolean /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6263,52 +6263,52 @@ public header inline fun BooleanArray.reduceIndexed(operation: (Int, Boolean, Bo * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun CharArray.reduceIndexed(operation: (Int, Char, Char) -> Char): Char +public header inline fun CharArray.reduceIndexed(operation: (index: Int, acc: Char, Char) -> Char): Char /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun Array.reduceRight(operation: (T, S) -> S): S +public header inline fun Array.reduceRight(operation: (T, acc: S) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte): Byte +public header inline fun ByteArray.reduceRight(operation: (Byte, acc: Byte) -> Byte): Byte /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short): Short +public header inline fun ShortArray.reduceRight(operation: (Short, acc: Short) -> Short): Short /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun IntArray.reduceRight(operation: (Int, Int) -> Int): Int +public header inline fun IntArray.reduceRight(operation: (Int, acc: Int) -> Int): Int /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun LongArray.reduceRight(operation: (Long, Long) -> Long): Long +public header inline fun LongArray.reduceRight(operation: (Long, acc: Long) -> Long): Long /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float): Float +public header inline fun FloatArray.reduceRight(operation: (Float, acc: Float) -> Float): Float /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double): Double +public header inline fun DoubleArray.reduceRight(operation: (Double, acc: Double) -> Double): Double /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Boolean): Boolean +public header inline fun BooleanArray.reduceRight(operation: (Boolean, acc: Boolean) -> Boolean): Boolean /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): Char +public header inline fun CharArray.reduceRight(operation: (Char, acc: Char) -> Char): Char /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6316,7 +6316,7 @@ public header inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun Array.reduceRightIndexed(operation: (Int, T, S) -> S): S +public header inline fun Array.reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6324,7 +6324,7 @@ public header inline fun Array.reduceRightIndexed(operation: (I * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun ByteArray.reduceRightIndexed(operation: (Int, Byte, Byte) -> Byte): Byte +public header inline fun ByteArray.reduceRightIndexed(operation: (index: Int, Byte, acc: Byte) -> Byte): Byte /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6332,7 +6332,7 @@ public header inline fun ByteArray.reduceRightIndexed(operation: (Int, Byte, Byt * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun ShortArray.reduceRightIndexed(operation: (Int, Short, Short) -> Short): Short +public header inline fun ShortArray.reduceRightIndexed(operation: (index: Int, Short, acc: Short) -> Short): Short /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6340,7 +6340,7 @@ public header inline fun ShortArray.reduceRightIndexed(operation: (Int, Short, S * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun IntArray.reduceRightIndexed(operation: (Int, Int, Int) -> Int): Int +public header inline fun IntArray.reduceRightIndexed(operation: (index: Int, Int, acc: Int) -> Int): Int /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6348,7 +6348,7 @@ public header inline fun IntArray.reduceRightIndexed(operation: (Int, Int, Int) * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun LongArray.reduceRightIndexed(operation: (Int, Long, Long) -> Long): Long +public header inline fun LongArray.reduceRightIndexed(operation: (index: Int, Long, acc: Long) -> Long): Long /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6356,7 +6356,7 @@ public header inline fun LongArray.reduceRightIndexed(operation: (Int, Long, Lon * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun FloatArray.reduceRightIndexed(operation: (Int, Float, Float) -> Float): Float +public header inline fun FloatArray.reduceRightIndexed(operation: (index: Int, Float, acc: Float) -> Float): Float /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6364,7 +6364,7 @@ public header inline fun FloatArray.reduceRightIndexed(operation: (Int, Float, F * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun DoubleArray.reduceRightIndexed(operation: (Int, Double, Double) -> Double): Double +public header inline fun DoubleArray.reduceRightIndexed(operation: (index: Int, Double, acc: Double) -> Double): Double /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6372,7 +6372,7 @@ public header inline fun DoubleArray.reduceRightIndexed(operation: (Int, Double, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun BooleanArray.reduceRightIndexed(operation: (Int, Boolean, Boolean) -> Boolean): Boolean +public header inline fun BooleanArray.reduceRightIndexed(operation: (index: Int, Boolean, acc: Boolean) -> Boolean): Boolean /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6380,7 +6380,7 @@ public header inline fun BooleanArray.reduceRightIndexed(operation: (Int, Boolea * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun CharArray.reduceRightIndexed(operation: (Int, Char, Char) -> Char): Char +public header inline fun CharArray.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char /** * Returns the sum of all values produced by [selector] function applied to each element in the array. @@ -6588,47 +6588,47 @@ public header infix fun CharArray.zip(other: Array): List Array.zip(other: Array, transform: (T, R) -> V): List +public header inline fun Array.zip(other: Array, transform: (a: T, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun ByteArray.zip(other: Array, transform: (Byte, R) -> V): List +public header inline fun ByteArray.zip(other: Array, transform: (a: Byte, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun ShortArray.zip(other: Array, transform: (Short, R) -> V): List +public header inline fun ShortArray.zip(other: Array, transform: (a: Short, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun IntArray.zip(other: Array, transform: (Int, R) -> V): List +public header inline fun IntArray.zip(other: Array, transform: (a: Int, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun LongArray.zip(other: Array, transform: (Long, R) -> V): List +public header inline fun LongArray.zip(other: Array, transform: (a: Long, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun FloatArray.zip(other: Array, transform: (Float, R) -> V): List +public header inline fun FloatArray.zip(other: Array, transform: (a: Float, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun DoubleArray.zip(other: Array, transform: (Double, R) -> V): List +public header inline fun DoubleArray.zip(other: Array, transform: (a: Double, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun BooleanArray.zip(other: Array, transform: (Boolean, R) -> V): List +public header inline fun BooleanArray.zip(other: Array, transform: (a: Boolean, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun CharArray.zip(other: Array, transform: (Char, R) -> V): List +public header inline fun CharArray.zip(other: Array, transform: (a: Char, b: R) -> V): List /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. @@ -6678,47 +6678,47 @@ public header infix fun CharArray.zip(other: Iterable): List Array.zip(other: Iterable, transform: (T, R) -> V): List +public header inline fun Array.zip(other: Iterable, transform: (a: T, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun ByteArray.zip(other: Iterable, transform: (Byte, R) -> V): List +public header inline fun ByteArray.zip(other: Iterable, transform: (a: Byte, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun ShortArray.zip(other: Iterable, transform: (Short, R) -> V): List +public header inline fun ShortArray.zip(other: Iterable, transform: (a: Short, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun IntArray.zip(other: Iterable, transform: (Int, R) -> V): List +public header inline fun IntArray.zip(other: Iterable, transform: (a: Int, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun LongArray.zip(other: Iterable, transform: (Long, R) -> V): List +public header inline fun LongArray.zip(other: Iterable, transform: (a: Long, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun FloatArray.zip(other: Iterable, transform: (Float, R) -> V): List +public header inline fun FloatArray.zip(other: Iterable, transform: (a: Float, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun DoubleArray.zip(other: Iterable, transform: (Double, R) -> V): List +public header inline fun DoubleArray.zip(other: Iterable, transform: (a: Double, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun BooleanArray.zip(other: Iterable, transform: (Boolean, R) -> V): List +public header inline fun BooleanArray.zip(other: Iterable, transform: (a: Boolean, b: R) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun CharArray.zip(other: Iterable, transform: (Char, R) -> V): List +public header inline fun CharArray.zip(other: Iterable, transform: (a: Char, b: R) -> V): List /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. @@ -6763,42 +6763,42 @@ public header 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. */ -public header inline fun ByteArray.zip(other: ByteArray, transform: (Byte, Byte) -> V): List +public header inline fun ByteArray.zip(other: ByteArray, transform: (a: Byte, b: Byte) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun ShortArray.zip(other: ShortArray, transform: (Short, Short) -> V): List +public header inline fun ShortArray.zip(other: ShortArray, transform: (a: Short, b: Short) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun IntArray.zip(other: IntArray, transform: (Int, Int) -> V): List +public header inline fun IntArray.zip(other: IntArray, transform: (a: Int, b: Int) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun LongArray.zip(other: LongArray, transform: (Long, Long) -> V): List +public header inline fun LongArray.zip(other: LongArray, transform: (a: Long, b: Long) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun FloatArray.zip(other: FloatArray, transform: (Float, Float) -> V): List +public header inline fun FloatArray.zip(other: FloatArray, transform: (a: Float, b: Float) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun DoubleArray.zip(other: DoubleArray, transform: (Double, Double) -> V): List +public header inline fun DoubleArray.zip(other: DoubleArray, transform: (a: Double, b: Double) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun BooleanArray.zip(other: BooleanArray, transform: (Boolean, Boolean) -> V): List +public header inline fun BooleanArray.zip(other: BooleanArray, transform: (a: Boolean, b: Boolean) -> V): List /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public header inline fun CharArray.zip(other: CharArray, transform: (Char, Char) -> V): List +public header inline fun CharArray.zip(other: CharArray, transform: (a: Char, b: Char) -> V): List /** * Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied. diff --git a/libraries/stdlib/common/src/generated/_Collections.kt b/libraries/stdlib/common/src/generated/_Collections.kt index 2885009e23f..0dbc386418b 100644 --- a/libraries/stdlib/common/src/generated/_Collections.kt +++ b/libraries/stdlib/common/src/generated/_Collections.kt @@ -284,14 +284,14 @@ public header inline fun Iterable.filter(predicate: (T) -> Boolean): List * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun Iterable.filterIndexed(predicate: (Int, T) -> Boolean): List +public header inline fun Iterable.filterIndexed(predicate: (index: Int, T) -> Boolean): List /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > Iterable.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C +public header inline fun > Iterable.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C /** * Returns a list containing all elements that are instances of specified type parameter R. @@ -608,7 +608,7 @@ public header inline fun Iterable.map(transform: (T) -> R): List * and returns the result of the transform applied to the element. */ @Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE") -public header inline fun Iterable.mapIndexed(transform: (Int, T) -> R): List +public header inline fun Iterable.mapIndexed(transform: (index: Int, T) -> R): List /** * Returns a list containing only the non-null results of applying the given [transform] function @@ -616,7 +616,7 @@ public header inline fun Iterable.mapIndexed(transform: (Int, T) -> R) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun Iterable.mapIndexedNotNull(transform: (Int, T) -> R?): List +public header inline fun Iterable.mapIndexedNotNull(transform: (index: Int, T) -> R?): List /** * Applies the given [transform] function to each element and its index in the original collection @@ -624,7 +624,7 @@ public header inline fun Iterable.mapIndexedNotNull(transform: ( * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > Iterable.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C +public header inline fun > Iterable.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C /** * Applies the given [transform] function to each element and its index in the original collection @@ -632,7 +632,7 @@ public header inline fun > Iterable.m * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > Iterable.mapIndexedTo(destination: C, transform: (Int, T) -> R): C +public header inline fun > Iterable.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C /** * Returns a list containing only the non-null results of applying the given [transform] function @@ -736,7 +736,7 @@ public header inline fun Iterable.count(predicate: (T) -> Boolean): Int /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun Iterable.fold(initial: R, operation: (R, T) -> R): R +public header inline fun Iterable.fold(initial: R, operation: (acc: R, T) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -744,12 +744,12 @@ public header inline fun Iterable.fold(initial: R, operation: (R, T) - * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun Iterable.foldIndexed(initial: R, operation: (Int, R, T) -> R): R +public header inline fun Iterable.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun List.foldRight(initial: R, operation: (T, R) -> R): R +public header inline fun List.foldRight(initial: R, operation: (T, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -757,7 +757,7 @@ public header inline fun List.foldRight(initial: R, operation: (T, R) * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun List.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R +public header inline fun List.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R /** * Performs the given [action] on each element. @@ -770,7 +770,7 @@ public header inline fun Iterable.forEach(action: (T) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun Iterable.forEachIndexed(action: (Int, T) -> Unit): Unit +public header inline fun Iterable.forEachIndexed(action: (index: Int, T) -> Unit): Unit /** * Returns the largest element or `null` if there are no elements. @@ -853,7 +853,7 @@ public header inline fun > C.onEach(action: (T) -> Unit): C /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun Iterable.reduce(operation: (S, T) -> S): S +public header inline fun Iterable.reduce(operation: (acc: S, T) -> S): S /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -861,12 +861,12 @@ public header inline fun Iterable.reduce(operation: (S, T) -> S): S * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun Iterable.reduceIndexed(operation: (Int, S, T) -> S): S +public header inline fun Iterable.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public header inline fun List.reduceRight(operation: (T, S) -> S): S +public header inline fun List.reduceRight(operation: (T, acc: S) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left @@ -874,7 +874,7 @@ public header inline fun List.reduceRight(operation: (T, S) -> S): * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun List.reduceRightIndexed(operation: (Int, T, S) -> S): S +public header inline fun List.reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S /** * Returns the sum of all values produced by [selector] function applied to each element in the collection. @@ -989,7 +989,7 @@ public header infix fun Iterable.zip(other: Array): List Iterable.zip(other: Array, transform: (T, R) -> V): List +public header inline fun Iterable.zip(other: Array, transform: (a: T, b: R) -> V): List /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. @@ -999,7 +999,7 @@ public header infix fun Iterable.zip(other: Iterable): List Iterable.zip(other: Iterable, transform: (T, R) -> V): List +public header inline fun Iterable.zip(other: Iterable, transform: (a: T, b: R) -> V): List /** * Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied. diff --git a/libraries/stdlib/common/src/generated/_Sequences.kt b/libraries/stdlib/common/src/generated/_Sequences.kt index d54619e90d5..7d9eb821910 100644 --- a/libraries/stdlib/common/src/generated/_Sequences.kt +++ b/libraries/stdlib/common/src/generated/_Sequences.kt @@ -146,14 +146,14 @@ public header fun Sequence.filter(predicate: (T) -> Boolean): Sequence * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header fun Sequence.filterIndexed(predicate: (Int, T) -> Boolean): Sequence +public header fun Sequence.filterIndexed(predicate: (index: Int, T) -> Boolean): Sequence /** * Appends all elements matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public header inline fun > Sequence.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C +public header inline fun > Sequence.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C /** * Returns a sequence containing all elements that are instances of specified type parameter R. @@ -378,7 +378,7 @@ public header fun Sequence.map(transform: (T) -> R): Sequence * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header fun Sequence.mapIndexed(transform: (Int, T) -> R): Sequence +public header fun Sequence.mapIndexed(transform: (index: Int, T) -> R): Sequence /** * Returns a sequence containing only the non-null results of applying the given [transform] function @@ -386,7 +386,7 @@ public header fun Sequence.mapIndexed(transform: (Int, T) -> R): Seque * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header fun Sequence.mapIndexedNotNull(transform: (Int, T) -> R?): Sequence +public header fun Sequence.mapIndexedNotNull(transform: (index: Int, T) -> R?): Sequence /** * Applies the given [transform] function to each element and its index in the original sequence @@ -394,7 +394,7 @@ public header fun Sequence.mapIndexedNotNull(transform: (Int, T) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C +public header inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C /** * Applies the given [transform] function to each element and its index in the original sequence @@ -402,7 +402,7 @@ public header inline fun > Sequence.m * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public header inline fun > Sequence.mapIndexedTo(destination: C, transform: (Int, T) -> R): C +public header inline fun > Sequence.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C /** * Returns a sequence containing only the non-null results of applying the given [transform] function @@ -477,7 +477,7 @@ public header inline fun Sequence.count(predicate: (T) -> Boolean): Int /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun Sequence.fold(initial: R, operation: (R, T) -> R): R +public header inline fun Sequence.fold(initial: R, operation: (acc: R, T) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -485,7 +485,7 @@ public header inline fun Sequence.fold(initial: R, operation: (R, T) - * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public header inline fun Sequence.foldIndexed(initial: R, operation: (Int, R, T) -> R): R +public header inline fun Sequence.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R /** * Performs the given [action] on each element. @@ -497,7 +497,7 @@ public header inline fun Sequence.forEach(action: (T) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public header inline fun Sequence.forEachIndexed(action: (Int, T) -> Unit): Unit +public header inline fun Sequence.forEachIndexed(action: (index: Int, T) -> Unit): Unit /** * Returns the largest element or `null` if there are no elements. @@ -580,7 +580,7 @@ public header fun Sequence.onEach(action: (T) -> Unit): Sequence /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public header inline fun Sequence.reduce(operation: (S, T) -> S): S +public header inline fun Sequence.reduce(operation: (acc: S, T) -> S): S /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -588,7 +588,7 @@ public header inline fun Sequence.reduce(operation: (S, T) -> S): S * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public header inline fun Sequence.reduceIndexed(operation: (Int, S, T) -> S): S +public header inline fun Sequence.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S /** * Returns the sum of all values produced by [selector] function applied to each element in the sequence. @@ -691,7 +691,7 @@ public header infix fun Sequence.zip(other: Sequence): Sequence Sequence.zip(other: Sequence, transform: (T, R) -> V): Sequence +public header fun Sequence.zip(other: Sequence, transform: (a: T, b: R) -> V): Sequence /** * Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied. diff --git a/libraries/stdlib/common/src/generated/_Strings.kt b/libraries/stdlib/common/src/generated/_Strings.kt index 197e1916f4b..e39e4a16239 100644 --- a/libraries/stdlib/common/src/generated/_Strings.kt +++ b/libraries/stdlib/common/src/generated/_Strings.kt @@ -180,21 +180,21 @@ public header inline fun String.filter(predicate: (Char) -> Boolean): String * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public header inline fun CharSequence.filterIndexed(predicate: (Int, Char) -> Boolean): CharSequence +public header inline fun CharSequence.filterIndexed(predicate: (index: Int, Char) -> Boolean): CharSequence /** * Returns a string containing only those characters from the original string that match the given [predicate]. * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public header inline fun String.filterIndexed(predicate: (Int, Char) -> Boolean): String +public header inline fun String.filterIndexed(predicate: (index: Int, Char) -> Boolean): String /** * Appends all characters matching the given [predicate] to the given [destination]. * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public header inline fun CharSequence.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C +public header inline fun CharSequence.filterIndexedTo(destination: C, predicate: (index: Int, Char) -> Boolean): C /** * Returns a char sequence containing only those characters from the original char sequence that do not match the given [predicate]. @@ -441,7 +441,7 @@ public header inline fun CharSequence.map(transform: (Char) -> R): List * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public header inline fun CharSequence.mapIndexed(transform: (Int, Char) -> R): List +public header inline fun CharSequence.mapIndexed(transform: (index: Int, Char) -> R): List /** * Returns a list containing only the non-null results of applying the given [transform] function @@ -449,7 +449,7 @@ public header inline fun CharSequence.mapIndexed(transform: (Int, Char) -> R * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public header inline fun CharSequence.mapIndexedNotNull(transform: (Int, Char) -> R?): List +public header inline fun CharSequence.mapIndexedNotNull(transform: (index: Int, Char) -> R?): List /** * Applies the given [transform] function to each character and its index in the original char sequence @@ -457,7 +457,7 @@ public header inline fun CharSequence.mapIndexedNotNull(transform: (In * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public header inline fun > CharSequence.mapIndexedNotNullTo(destination: C, transform: (Int, Char) -> R?): C +public header inline fun > CharSequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, Char) -> R?): C /** * Applies the given [transform] function to each character and its index in the original char sequence @@ -465,7 +465,7 @@ public header inline fun > CharSequence.map * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public header inline fun > CharSequence.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C +public header inline fun > CharSequence.mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C /** * Returns a list containing only the non-null results of applying the given [transform] function @@ -519,7 +519,7 @@ public header inline fun CharSequence.count(predicate: (Char) -> Boolean): Int /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each character. */ -public header inline fun CharSequence.fold(initial: R, operation: (R, Char) -> R): R +public header inline fun CharSequence.fold(initial: R, operation: (acc: R, Char) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right @@ -527,12 +527,12 @@ public header inline fun CharSequence.fold(initial: R, operation: (R, Char) * @param [operation] function that takes the index of a character, current accumulator value * and the character itself, and calculates the next accumulator value. */ -public header inline fun CharSequence.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R +public header inline fun CharSequence.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each character and current accumulator value. */ -public header inline fun CharSequence.foldRight(initial: R, operation: (Char, R) -> R): R +public header inline fun CharSequence.foldRight(initial: R, operation: (Char, acc: R) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from right to left @@ -540,7 +540,7 @@ public header inline fun CharSequence.foldRight(initial: R, operation: (Char * @param [operation] function that takes the index of a character, the character itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun CharSequence.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R +public header inline fun CharSequence.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R /** * Performs the given [action] on each character. @@ -552,7 +552,7 @@ public header inline fun CharSequence.forEach(action: (Char) -> Unit): Unit * @param [action] function that takes the index of a character and the character itself * and performs the desired action on the character. */ -public header inline fun CharSequence.forEachIndexed(action: (Int, Char) -> Unit): Unit +public header inline fun CharSequence.forEachIndexed(action: (index: Int, Char) -> Unit): Unit /** * Returns the largest character or `null` if there are no characters. @@ -603,7 +603,7 @@ public header inline fun S.onEach(action: (Char) -> Unit): S /** * Accumulates value starting with the first character and applying [operation] from left to right to current accumulator value and each character. */ -public header inline fun CharSequence.reduce(operation: (Char, Char) -> Char): Char +public header inline fun CharSequence.reduce(operation: (acc: Char, Char) -> Char): Char /** * Accumulates value starting with the first character and applying [operation] from left to right @@ -611,12 +611,12 @@ public header inline fun CharSequence.reduce(operation: (Char, Char) -> Char): C * @param [operation] function that takes the index of a character, current accumulator value * and the character itself and calculates the next accumulator value. */ -public header inline fun CharSequence.reduceIndexed(operation: (Int, Char, Char) -> Char): Char +public header inline fun CharSequence.reduceIndexed(operation: (index: Int, acc: Char, Char) -> Char): Char /** * Accumulates value starting with last character and applying [operation] from right to left to each character and current accumulator value. */ -public header inline fun CharSequence.reduceRight(operation: (Char, Char) -> Char): Char +public header inline fun CharSequence.reduceRight(operation: (Char, acc: Char) -> Char): Char /** * Accumulates value starting with last character and applying [operation] from right to left @@ -624,7 +624,7 @@ public header inline fun CharSequence.reduceRight(operation: (Char, Char) -> Cha * @param [operation] function that takes the index of a character, the character itself * and current accumulator value, and calculates the next accumulator value. */ -public header inline fun CharSequence.reduceRightIndexed(operation: (Int, Char, Char) -> Char): Char +public header inline fun CharSequence.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char /** * Returns the sum of all values produced by [selector] function applied to each character in the char sequence. @@ -658,7 +658,7 @@ public header infix fun CharSequence.zip(other: CharSequence): List CharSequence.zip(other: CharSequence, transform: (Char, Char) -> V): List +public header inline fun CharSequence.zip(other: CharSequence, transform: (a: Char, b: Char) -> V): List /** * Creates an [Iterable] instance that wraps the original char sequence returning its characters when being iterated. diff --git a/libraries/stdlib/common/src/kotlin/KotlinH.kt b/libraries/stdlib/common/src/kotlin/KotlinH.kt index ac9c0cde827..2cb9af57e42 100644 --- a/libraries/stdlib/common/src/kotlin/KotlinH.kt +++ b/libraries/stdlib/common/src/kotlin/KotlinH.kt @@ -63,7 +63,7 @@ header interface Comparator { fun compare(a: T, b: T): Int } -header inline fun Comparator(crossinline comparison: (T, T) -> Int): Comparator +header inline fun Comparator(crossinline comparison: (a: T, b: T) -> Int): Comparator // From kotlin.kt diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 14b90ab8989..778477a7c6d 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -2975,7 +2975,7 @@ public inline fun CharArray.filter(predicate: (Char) -> Boolean): List { * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun Array.filterIndexed(predicate: (Int, T) -> Boolean): List { +public inline fun Array.filterIndexed(predicate: (index: Int, T) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -2984,7 +2984,7 @@ public inline fun Array.filterIndexed(predicate: (Int, T) -> Boolean) * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun ByteArray.filterIndexed(predicate: (Int, Byte) -> Boolean): List { +public inline fun ByteArray.filterIndexed(predicate: (index: Int, Byte) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -2993,7 +2993,7 @@ public inline fun ByteArray.filterIndexed(predicate: (Int, Byte) -> Boolean): Li * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun ShortArray.filterIndexed(predicate: (Int, Short) -> Boolean): List { +public inline fun ShortArray.filterIndexed(predicate: (index: Int, Short) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3002,7 +3002,7 @@ public inline fun ShortArray.filterIndexed(predicate: (Int, Short) -> Boolean): * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun IntArray.filterIndexed(predicate: (Int, Int) -> Boolean): List { +public inline fun IntArray.filterIndexed(predicate: (index: Int, Int) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3011,7 +3011,7 @@ public inline fun IntArray.filterIndexed(predicate: (Int, Int) -> Boolean): List * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun LongArray.filterIndexed(predicate: (Int, Long) -> Boolean): List { +public inline fun LongArray.filterIndexed(predicate: (index: Int, Long) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3020,7 +3020,7 @@ public inline fun LongArray.filterIndexed(predicate: (Int, Long) -> Boolean): Li * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun FloatArray.filterIndexed(predicate: (Int, Float) -> Boolean): List { +public inline fun FloatArray.filterIndexed(predicate: (index: Int, Float) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3029,7 +3029,7 @@ public inline fun FloatArray.filterIndexed(predicate: (Int, Float) -> Boolean): * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun DoubleArray.filterIndexed(predicate: (Int, Double) -> Boolean): List { +public inline fun DoubleArray.filterIndexed(predicate: (index: Int, Double) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3038,7 +3038,7 @@ public inline fun DoubleArray.filterIndexed(predicate: (Int, Double) -> Boolean) * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun BooleanArray.filterIndexed(predicate: (Int, Boolean) -> Boolean): List { +public inline fun BooleanArray.filterIndexed(predicate: (index: Int, Boolean) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3047,7 +3047,7 @@ public inline fun BooleanArray.filterIndexed(predicate: (Int, Boolean) -> Boolea * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun CharArray.filterIndexed(predicate: (Int, Char) -> Boolean): List { +public inline fun CharArray.filterIndexed(predicate: (index: Int, Char) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -3056,7 +3056,7 @@ public inline fun CharArray.filterIndexed(predicate: (Int, Char) -> Boolean): Li * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > Array.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C { +public inline fun > Array.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3068,7 +3068,7 @@ public inline fun > Array.filterIndexedTo( * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > ByteArray.filterIndexedTo(destination: C, predicate: (Int, Byte) -> Boolean): C { +public inline fun > ByteArray.filterIndexedTo(destination: C, predicate: (index: Int, Byte) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3080,7 +3080,7 @@ public inline fun > ByteArray.filterIndexedTo(des * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > ShortArray.filterIndexedTo(destination: C, predicate: (Int, Short) -> Boolean): C { +public inline fun > ShortArray.filterIndexedTo(destination: C, predicate: (index: Int, Short) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3092,7 +3092,7 @@ public inline fun > ShortArray.filterIndexedTo(d * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > IntArray.filterIndexedTo(destination: C, predicate: (Int, Int) -> Boolean): C { +public inline fun > IntArray.filterIndexedTo(destination: C, predicate: (index: Int, Int) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3104,7 +3104,7 @@ public inline fun > IntArray.filterIndexedTo(desti * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > LongArray.filterIndexedTo(destination: C, predicate: (Int, Long) -> Boolean): C { +public inline fun > LongArray.filterIndexedTo(destination: C, predicate: (index: Int, Long) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3116,7 +3116,7 @@ public inline fun > LongArray.filterIndexedTo(des * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > FloatArray.filterIndexedTo(destination: C, predicate: (Int, Float) -> Boolean): C { +public inline fun > FloatArray.filterIndexedTo(destination: C, predicate: (index: Int, Float) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3128,7 +3128,7 @@ public inline fun > FloatArray.filterIndexedTo(d * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > DoubleArray.filterIndexedTo(destination: C, predicate: (Int, Double) -> Boolean): C { +public inline fun > DoubleArray.filterIndexedTo(destination: C, predicate: (index: Int, Double) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3140,7 +3140,7 @@ public inline fun > DoubleArray.filterIndexedTo * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > BooleanArray.filterIndexedTo(destination: C, predicate: (Int, Boolean) -> Boolean): C { +public inline fun > BooleanArray.filterIndexedTo(destination: C, predicate: (index: Int, Boolean) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -3152,7 +3152,7 @@ public inline fun > BooleanArray.filterIndexed * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > CharArray.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C { +public inline fun > CharArray.filterIndexedTo(destination: C, predicate: (index: Int, Char) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -7803,7 +7803,7 @@ public inline fun CharArray.map(transform: (Char) -> R): List { * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun Array.mapIndexed(transform: (Int, T) -> R): List { +public inline fun Array.mapIndexed(transform: (index: Int, T) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7813,7 +7813,7 @@ public inline fun Array.mapIndexed(transform: (Int, T) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun ByteArray.mapIndexed(transform: (Int, Byte) -> R): List { +public inline fun ByteArray.mapIndexed(transform: (index: Int, Byte) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7823,7 +7823,7 @@ public inline fun ByteArray.mapIndexed(transform: (Int, Byte) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun ShortArray.mapIndexed(transform: (Int, Short) -> R): List { +public inline fun ShortArray.mapIndexed(transform: (index: Int, Short) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7833,7 +7833,7 @@ public inline fun ShortArray.mapIndexed(transform: (Int, Short) -> R): List< * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun IntArray.mapIndexed(transform: (Int, Int) -> R): List { +public inline fun IntArray.mapIndexed(transform: (index: Int, Int) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7843,7 +7843,7 @@ public inline fun IntArray.mapIndexed(transform: (Int, Int) -> R): List { * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun LongArray.mapIndexed(transform: (Int, Long) -> R): List { +public inline fun LongArray.mapIndexed(transform: (index: Int, Long) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7853,7 +7853,7 @@ public inline fun LongArray.mapIndexed(transform: (Int, Long) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun FloatArray.mapIndexed(transform: (Int, Float) -> R): List { +public inline fun FloatArray.mapIndexed(transform: (index: Int, Float) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7863,7 +7863,7 @@ public inline fun FloatArray.mapIndexed(transform: (Int, Float) -> R): List< * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun DoubleArray.mapIndexed(transform: (Int, Double) -> R): List { +public inline fun DoubleArray.mapIndexed(transform: (index: Int, Double) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7873,7 +7873,7 @@ public inline fun DoubleArray.mapIndexed(transform: (Int, Double) -> R): Lis * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun BooleanArray.mapIndexed(transform: (Int, Boolean) -> R): List { +public inline fun BooleanArray.mapIndexed(transform: (index: Int, Boolean) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7883,7 +7883,7 @@ public inline fun BooleanArray.mapIndexed(transform: (Int, Boolean) -> R): L * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun CharArray.mapIndexed(transform: (Int, Char) -> R): List { +public inline fun CharArray.mapIndexed(transform: (index: Int, Char) -> R): List { return mapIndexedTo(ArrayList(size), transform) } @@ -7893,7 +7893,7 @@ public inline fun CharArray.mapIndexed(transform: (Int, Char) -> R): List * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun Array.mapIndexedNotNull(transform: (Int, T) -> R?): List { +public inline fun Array.mapIndexedNotNull(transform: (index: Int, T) -> R?): List { return mapIndexedNotNullTo(ArrayList(), transform) } @@ -7903,7 +7903,7 @@ public inline fun Array.mapIndexedNotNull(transform: (Int, T * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Array.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C { +public inline fun > Array.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -7914,7 +7914,7 @@ public inline fun > Array.mapInde * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Array.mapIndexedTo(destination: C, transform: (Int, T) -> R): C { +public inline fun > Array.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7927,7 +7927,7 @@ public inline fun > Array.mapIndexedTo( * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > ByteArray.mapIndexedTo(destination: C, transform: (Int, Byte) -> R): C { +public inline fun > ByteArray.mapIndexedTo(destination: C, transform: (index: Int, Byte) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7940,7 +7940,7 @@ public inline fun > ByteArray.mapIndexedTo(destin * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > ShortArray.mapIndexedTo(destination: C, transform: (Int, Short) -> R): C { +public inline fun > ShortArray.mapIndexedTo(destination: C, transform: (index: Int, Short) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7953,7 +7953,7 @@ public inline fun > ShortArray.mapIndexedTo(desti * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > IntArray.mapIndexedTo(destination: C, transform: (Int, Int) -> R): C { +public inline fun > IntArray.mapIndexedTo(destination: C, transform: (index: Int, Int) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7966,7 +7966,7 @@ public inline fun > IntArray.mapIndexedTo(destina * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > LongArray.mapIndexedTo(destination: C, transform: (Int, Long) -> R): C { +public inline fun > LongArray.mapIndexedTo(destination: C, transform: (index: Int, Long) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7979,7 +7979,7 @@ public inline fun > LongArray.mapIndexedTo(destin * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > FloatArray.mapIndexedTo(destination: C, transform: (Int, Float) -> R): C { +public inline fun > FloatArray.mapIndexedTo(destination: C, transform: (index: Int, Float) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -7992,7 +7992,7 @@ public inline fun > FloatArray.mapIndexedTo(desti * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > DoubleArray.mapIndexedTo(destination: C, transform: (Int, Double) -> R): C { +public inline fun > DoubleArray.mapIndexedTo(destination: C, transform: (index: Int, Double) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -8005,7 +8005,7 @@ public inline fun > DoubleArray.mapIndexedTo(dest * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > BooleanArray.mapIndexedTo(destination: C, transform: (Int, Boolean) -> R): C { +public inline fun > BooleanArray.mapIndexedTo(destination: C, transform: (index: Int, Boolean) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -8018,7 +8018,7 @@ public inline fun > BooleanArray.mapIndexedTo(des * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > CharArray.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C { +public inline fun > CharArray.mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -9215,7 +9215,7 @@ public inline fun CharArray.count(predicate: (Char) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Array.fold(initial: R, operation: (R, T) -> R): R { +public inline fun Array.fold(initial: R, operation: (acc: R, T) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9224,7 +9224,7 @@ public inline fun Array.fold(initial: R, operation: (R, T) -> R): /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ByteArray.fold(initial: R, operation: (R, Byte) -> R): R { +public inline fun ByteArray.fold(initial: R, operation: (acc: R, Byte) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9233,7 +9233,7 @@ public inline fun ByteArray.fold(initial: R, operation: (R, Byte) -> R): R { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ShortArray.fold(initial: R, operation: (R, Short) -> R): R { +public inline fun ShortArray.fold(initial: R, operation: (acc: R, Short) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9242,7 +9242,7 @@ public inline fun ShortArray.fold(initial: R, operation: (R, Short) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun IntArray.fold(initial: R, operation: (R, Int) -> R): R { +public inline fun IntArray.fold(initial: R, operation: (acc: R, Int) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9251,7 +9251,7 @@ public inline fun IntArray.fold(initial: R, operation: (R, Int) -> R): R { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun LongArray.fold(initial: R, operation: (R, Long) -> R): R { +public inline fun LongArray.fold(initial: R, operation: (acc: R, Long) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9260,7 +9260,7 @@ public inline fun LongArray.fold(initial: R, operation: (R, Long) -> R): R { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun FloatArray.fold(initial: R, operation: (R, Float) -> R): R { +public inline fun FloatArray.fold(initial: R, operation: (acc: R, Float) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9269,7 +9269,7 @@ public inline fun FloatArray.fold(initial: R, operation: (R, Float) -> R): R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun DoubleArray.fold(initial: R, operation: (R, Double) -> R): R { +public inline fun DoubleArray.fold(initial: R, operation: (acc: R, Double) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9278,7 +9278,7 @@ public inline fun DoubleArray.fold(initial: R, operation: (R, Double) -> R): /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun BooleanArray.fold(initial: R, operation: (R, Boolean) -> R): R { +public inline fun BooleanArray.fold(initial: R, operation: (acc: R, Boolean) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9287,7 +9287,7 @@ public inline fun BooleanArray.fold(initial: R, operation: (R, Boolean) -> R /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun CharArray.fold(initial: R, operation: (R, Char) -> R): R { +public inline fun CharArray.fold(initial: R, operation: (acc: R, Char) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -9299,7 +9299,7 @@ public inline fun CharArray.fold(initial: R, operation: (R, Char) -> R): R { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun Array.foldIndexed(initial: R, operation: (Int, R, T) -> R): R { +public inline fun Array.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9312,7 +9312,7 @@ public inline fun Array.foldIndexed(initial: R, operation: (Int, R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun ByteArray.foldIndexed(initial: R, operation: (Int, R, Byte) -> R): R { +public inline fun ByteArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Byte) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9325,7 +9325,7 @@ public inline fun ByteArray.foldIndexed(initial: R, operation: (Int, R, Byte * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun ShortArray.foldIndexed(initial: R, operation: (Int, R, Short) -> R): R { +public inline fun ShortArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Short) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9338,7 +9338,7 @@ public inline fun ShortArray.foldIndexed(initial: R, operation: (Int, R, Sho * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun IntArray.foldIndexed(initial: R, operation: (Int, R, Int) -> R): R { +public inline fun IntArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Int) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9351,7 +9351,7 @@ public inline fun IntArray.foldIndexed(initial: R, operation: (Int, R, Int) * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun LongArray.foldIndexed(initial: R, operation: (Int, R, Long) -> R): R { +public inline fun LongArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Long) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9364,7 +9364,7 @@ public inline fun LongArray.foldIndexed(initial: R, operation: (Int, R, Long * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun FloatArray.foldIndexed(initial: R, operation: (Int, R, Float) -> R): R { +public inline fun FloatArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Float) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9377,7 +9377,7 @@ public inline fun FloatArray.foldIndexed(initial: R, operation: (Int, R, Flo * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun DoubleArray.foldIndexed(initial: R, operation: (Int, R, Double) -> R): R { +public inline fun DoubleArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Double) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9390,7 +9390,7 @@ public inline fun DoubleArray.foldIndexed(initial: R, operation: (Int, R, Do * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun BooleanArray.foldIndexed(initial: R, operation: (Int, R, Boolean) -> R): R { +public inline fun BooleanArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Boolean) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9403,7 +9403,7 @@ public inline fun BooleanArray.foldIndexed(initial: R, operation: (Int, R, B * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun CharArray.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R { +public inline fun CharArray.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -9413,7 +9413,7 @@ public inline fun CharArray.foldIndexed(initial: R, operation: (Int, R, Char /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun Array.foldRight(initial: R, operation: (T, R) -> R): R { +public inline fun Array.foldRight(initial: R, operation: (T, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9425,7 +9425,7 @@ public inline fun Array.foldRight(initial: R, operation: (T, R) -> /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ByteArray.foldRight(initial: R, operation: (Byte, R) -> R): R { +public inline fun ByteArray.foldRight(initial: R, operation: (Byte, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9437,7 +9437,7 @@ public inline fun ByteArray.foldRight(initial: R, operation: (Byte, R) -> R) /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ShortArray.foldRight(initial: R, operation: (Short, R) -> R): R { +public inline fun ShortArray.foldRight(initial: R, operation: (Short, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9449,7 +9449,7 @@ public inline fun ShortArray.foldRight(initial: R, operation: (Short, R) -> /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun IntArray.foldRight(initial: R, operation: (Int, R) -> R): R { +public inline fun IntArray.foldRight(initial: R, operation: (Int, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9461,7 +9461,7 @@ public inline fun IntArray.foldRight(initial: R, operation: (Int, R) -> R): /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun LongArray.foldRight(initial: R, operation: (Long, R) -> R): R { +public inline fun LongArray.foldRight(initial: R, operation: (Long, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9473,7 +9473,7 @@ public inline fun LongArray.foldRight(initial: R, operation: (Long, R) -> R) /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun FloatArray.foldRight(initial: R, operation: (Float, R) -> R): R { +public inline fun FloatArray.foldRight(initial: R, operation: (Float, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9485,7 +9485,7 @@ public inline fun FloatArray.foldRight(initial: R, operation: (Float, R) -> /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun DoubleArray.foldRight(initial: R, operation: (Double, R) -> R): R { +public inline fun DoubleArray.foldRight(initial: R, operation: (Double, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9497,7 +9497,7 @@ public inline fun DoubleArray.foldRight(initial: R, operation: (Double, R) - /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, R) -> R): R { +public inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9509,7 +9509,7 @@ public inline fun BooleanArray.foldRight(initial: R, operation: (Boolean, R) /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun CharArray.foldRight(initial: R, operation: (Char, R) -> R): R { +public inline fun CharArray.foldRight(initial: R, operation: (Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9524,7 +9524,7 @@ public inline fun CharArray.foldRight(initial: R, operation: (Char, R) -> R) * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun Array.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R { +public inline fun Array.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9540,7 +9540,7 @@ public inline fun Array.foldRightIndexed(initial: R, operation: (I * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ByteArray.foldRightIndexed(initial: R, operation: (Int, Byte, R) -> R): R { +public inline fun ByteArray.foldRightIndexed(initial: R, operation: (index: Int, Byte, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9556,7 +9556,7 @@ public inline fun ByteArray.foldRightIndexed(initial: R, operation: (Int, By * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ShortArray.foldRightIndexed(initial: R, operation: (Int, Short, R) -> R): R { +public inline fun ShortArray.foldRightIndexed(initial: R, operation: (index: Int, Short, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9572,7 +9572,7 @@ public inline fun ShortArray.foldRightIndexed(initial: R, operation: (Int, S * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun IntArray.foldRightIndexed(initial: R, operation: (Int, Int, R) -> R): R { +public inline fun IntArray.foldRightIndexed(initial: R, operation: (index: Int, Int, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9588,7 +9588,7 @@ public inline fun IntArray.foldRightIndexed(initial: R, operation: (Int, Int * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun LongArray.foldRightIndexed(initial: R, operation: (Int, Long, R) -> R): R { +public inline fun LongArray.foldRightIndexed(initial: R, operation: (index: Int, Long, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9604,7 +9604,7 @@ public inline fun LongArray.foldRightIndexed(initial: R, operation: (Int, Lo * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun FloatArray.foldRightIndexed(initial: R, operation: (Int, Float, R) -> R): R { +public inline fun FloatArray.foldRightIndexed(initial: R, operation: (index: Int, Float, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9620,7 +9620,7 @@ public inline fun FloatArray.foldRightIndexed(initial: R, operation: (Int, F * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun DoubleArray.foldRightIndexed(initial: R, operation: (Int, Double, R) -> R): R { +public inline fun DoubleArray.foldRightIndexed(initial: R, operation: (index: Int, Double, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9636,7 +9636,7 @@ public inline fun DoubleArray.foldRightIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun BooleanArray.foldRightIndexed(initial: R, operation: (Int, Boolean, R) -> R): R { +public inline fun BooleanArray.foldRightIndexed(initial: R, operation: (index: Int, Boolean, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9652,7 +9652,7 @@ public inline fun BooleanArray.foldRightIndexed(initial: R, operation: (Int, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharArray.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R { +public inline fun CharArray.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -9730,7 +9730,7 @@ public inline fun CharArray.forEach(action: (Char) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun Array.forEachIndexed(action: (Int, T) -> Unit): Unit { +public inline fun Array.forEachIndexed(action: (index: Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9740,7 +9740,7 @@ public inline fun Array.forEachIndexed(action: (Int, T) -> Unit): Uni * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun ByteArray.forEachIndexed(action: (Int, Byte) -> Unit): Unit { +public inline fun ByteArray.forEachIndexed(action: (index: Int, Byte) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9750,7 +9750,7 @@ public inline fun ByteArray.forEachIndexed(action: (Int, Byte) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun ShortArray.forEachIndexed(action: (Int, Short) -> Unit): Unit { +public inline fun ShortArray.forEachIndexed(action: (index: Int, Short) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9760,7 +9760,7 @@ public inline fun ShortArray.forEachIndexed(action: (Int, Short) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun IntArray.forEachIndexed(action: (Int, Int) -> Unit): Unit { +public inline fun IntArray.forEachIndexed(action: (index: Int, Int) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9770,7 +9770,7 @@ public inline fun IntArray.forEachIndexed(action: (Int, Int) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun LongArray.forEachIndexed(action: (Int, Long) -> Unit): Unit { +public inline fun LongArray.forEachIndexed(action: (index: Int, Long) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9780,7 +9780,7 @@ public inline fun LongArray.forEachIndexed(action: (Int, Long) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun FloatArray.forEachIndexed(action: (Int, Float) -> Unit): Unit { +public inline fun FloatArray.forEachIndexed(action: (index: Int, Float) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9790,7 +9790,7 @@ public inline fun FloatArray.forEachIndexed(action: (Int, Float) -> Unit): Unit * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun DoubleArray.forEachIndexed(action: (Int, Double) -> Unit): Unit { +public inline fun DoubleArray.forEachIndexed(action: (index: Int, Double) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9800,7 +9800,7 @@ public inline fun DoubleArray.forEachIndexed(action: (Int, Double) -> Unit): Uni * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun BooleanArray.forEachIndexed(action: (Int, Boolean) -> Unit): Unit { +public inline fun BooleanArray.forEachIndexed(action: (index: Int, Boolean) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -9810,7 +9810,7 @@ public inline fun BooleanArray.forEachIndexed(action: (Int, Boolean) -> Unit): U * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun CharArray.forEachIndexed(action: (Int, Char) -> Unit): Unit { +public inline fun CharArray.forEachIndexed(action: (index: Int, Char) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -10816,7 +10816,7 @@ public inline fun CharArray.none(predicate: (Char) -> Boolean): Boolean { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Array.reduce(operation: (S, T) -> S): S { +public inline fun Array.reduce(operation: (acc: S, T) -> S): S { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = this[0] @@ -10829,7 +10829,7 @@ public inline fun Array.reduce(operation: (S, T) -> S): S { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ByteArray.reduce(operation: (Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduce(operation: (acc: Byte, Byte) -> Byte): Byte { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10842,7 +10842,7 @@ public inline fun ByteArray.reduce(operation: (Byte, Byte) -> Byte): Byte { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun ShortArray.reduce(operation: (Short, Short) -> Short): Short { +public inline fun ShortArray.reduce(operation: (acc: Short, Short) -> Short): Short { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10855,7 +10855,7 @@ public inline fun ShortArray.reduce(operation: (Short, Short) -> Short): Short { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun IntArray.reduce(operation: (Int, Int) -> Int): Int { +public inline fun IntArray.reduce(operation: (acc: Int, Int) -> Int): Int { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10868,7 +10868,7 @@ public inline fun IntArray.reduce(operation: (Int, Int) -> Int): Int { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun LongArray.reduce(operation: (Long, Long) -> Long): Long { +public inline fun LongArray.reduce(operation: (acc: Long, Long) -> Long): Long { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10881,7 +10881,7 @@ public inline fun LongArray.reduce(operation: (Long, Long) -> Long): Long { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun FloatArray.reduce(operation: (Float, Float) -> Float): Float { +public inline fun FloatArray.reduce(operation: (acc: Float, Float) -> Float): Float { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10894,7 +10894,7 @@ public inline fun FloatArray.reduce(operation: (Float, Float) -> Float): Float { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun DoubleArray.reduce(operation: (Double, Double) -> Double): Double { +public inline fun DoubleArray.reduce(operation: (acc: Double, Double) -> Double): Double { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10907,7 +10907,7 @@ public inline fun DoubleArray.reduce(operation: (Double, Double) -> Double): Dou /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun BooleanArray.reduce(operation: (Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduce(operation: (acc: Boolean, Boolean) -> Boolean): Boolean { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10920,7 +10920,7 @@ public inline fun BooleanArray.reduce(operation: (Boolean, Boolean) -> Boolean): /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun CharArray.reduce(operation: (Char, Char) -> Char): Char { +public inline fun CharArray.reduce(operation: (acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10936,7 +10936,7 @@ public inline fun CharArray.reduce(operation: (Char, Char) -> Char): Char { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun Array.reduceIndexed(operation: (Int, S, T) -> S): S { +public inline fun Array.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = this[0] @@ -10952,7 +10952,7 @@ public inline fun Array.reduceIndexed(operation: (Int, S, T) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun ByteArray.reduceIndexed(operation: (Int, Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduceIndexed(operation: (index: Int, acc: Byte, Byte) -> Byte): Byte { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10968,7 +10968,7 @@ public inline fun ByteArray.reduceIndexed(operation: (Int, Byte, Byte) -> Byte): * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun ShortArray.reduceIndexed(operation: (Int, Short, Short) -> Short): Short { +public inline fun ShortArray.reduceIndexed(operation: (index: Int, acc: Short, Short) -> Short): Short { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -10984,7 +10984,7 @@ public inline fun ShortArray.reduceIndexed(operation: (Int, Short, Short) -> Sho * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun IntArray.reduceIndexed(operation: (Int, Int, Int) -> Int): Int { +public inline fun IntArray.reduceIndexed(operation: (index: Int, acc: Int, Int) -> Int): Int { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -11000,7 +11000,7 @@ public inline fun IntArray.reduceIndexed(operation: (Int, Int, Int) -> Int): Int * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun LongArray.reduceIndexed(operation: (Int, Long, Long) -> Long): Long { +public inline fun LongArray.reduceIndexed(operation: (index: Int, acc: Long, Long) -> Long): Long { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -11016,7 +11016,7 @@ public inline fun LongArray.reduceIndexed(operation: (Int, Long, Long) -> Long): * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun FloatArray.reduceIndexed(operation: (Int, Float, Float) -> Float): Float { +public inline fun FloatArray.reduceIndexed(operation: (index: Int, acc: Float, Float) -> Float): Float { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -11032,7 +11032,7 @@ public inline fun FloatArray.reduceIndexed(operation: (Int, Float, Float) -> Flo * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun DoubleArray.reduceIndexed(operation: (Int, Double, Double) -> Double): Double { +public inline fun DoubleArray.reduceIndexed(operation: (index: Int, acc: Double, Double) -> Double): Double { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -11048,7 +11048,7 @@ public inline fun DoubleArray.reduceIndexed(operation: (Int, Double, Double) -> * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun BooleanArray.reduceIndexed(operation: (Int, Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduceIndexed(operation: (index: Int, acc: Boolean, Boolean) -> Boolean): Boolean { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -11064,7 +11064,7 @@ public inline fun BooleanArray.reduceIndexed(operation: (Int, Boolean, Boolean) * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun CharArray.reduceIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharArray.reduceIndexed(operation: (index: Int, acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = this[0] @@ -11077,7 +11077,7 @@ public inline fun CharArray.reduceIndexed(operation: (Int, Char, Char) -> Char): /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun Array.reduceRight(operation: (T, S) -> S): S { +public inline fun Array.reduceRight(operation: (T, acc: S) -> S): S { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = get(index--) @@ -11090,7 +11090,7 @@ public inline fun Array.reduceRight(operation: (T, S) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduceRight(operation: (Byte, acc: Byte) -> Byte): Byte { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11103,7 +11103,7 @@ public inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte): Byte { /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short): Short { +public inline fun ShortArray.reduceRight(operation: (Short, acc: Short) -> Short): Short { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11116,7 +11116,7 @@ public inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short): Sh /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun IntArray.reduceRight(operation: (Int, Int) -> Int): Int { +public inline fun IntArray.reduceRight(operation: (Int, acc: Int) -> Int): Int { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11129,7 +11129,7 @@ public inline fun IntArray.reduceRight(operation: (Int, Int) -> Int): Int { /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun LongArray.reduceRight(operation: (Long, Long) -> Long): Long { +public inline fun LongArray.reduceRight(operation: (Long, acc: Long) -> Long): Long { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11142,7 +11142,7 @@ public inline fun LongArray.reduceRight(operation: (Long, Long) -> Long): Long { /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float): Float { +public inline fun FloatArray.reduceRight(operation: (Float, acc: Float) -> Float): Float { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11155,7 +11155,7 @@ public inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float): Fl /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double): Double { +public inline fun DoubleArray.reduceRight(operation: (Double, acc: Double) -> Double): Double { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11168,7 +11168,7 @@ public inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double) /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduceRight(operation: (Boolean, acc: Boolean) -> Boolean): Boolean { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11181,7 +11181,7 @@ public inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Bool /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): Char { +public inline fun CharArray.reduceRight(operation: (Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11197,7 +11197,7 @@ public inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): Char { * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun Array.reduceRightIndexed(operation: (Int, T, S) -> S): S { +public inline fun Array.reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator: S = get(index--) @@ -11214,7 +11214,7 @@ public inline fun Array.reduceRightIndexed(operation: (Int, T, * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ByteArray.reduceRightIndexed(operation: (Int, Byte, Byte) -> Byte): Byte { +public inline fun ByteArray.reduceRightIndexed(operation: (index: Int, Byte, acc: Byte) -> Byte): Byte { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11231,7 +11231,7 @@ public inline fun ByteArray.reduceRightIndexed(operation: (Int, Byte, Byte) -> B * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun ShortArray.reduceRightIndexed(operation: (Int, Short, Short) -> Short): Short { +public inline fun ShortArray.reduceRightIndexed(operation: (index: Int, Short, acc: Short) -> Short): Short { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11248,7 +11248,7 @@ public inline fun ShortArray.reduceRightIndexed(operation: (Int, Short, Short) - * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun IntArray.reduceRightIndexed(operation: (Int, Int, Int) -> Int): Int { +public inline fun IntArray.reduceRightIndexed(operation: (index: Int, Int, acc: Int) -> Int): Int { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11265,7 +11265,7 @@ public inline fun IntArray.reduceRightIndexed(operation: (Int, Int, Int) -> Int) * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun LongArray.reduceRightIndexed(operation: (Int, Long, Long) -> Long): Long { +public inline fun LongArray.reduceRightIndexed(operation: (index: Int, Long, acc: Long) -> Long): Long { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11282,7 +11282,7 @@ public inline fun LongArray.reduceRightIndexed(operation: (Int, Long, Long) -> L * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun FloatArray.reduceRightIndexed(operation: (Int, Float, Float) -> Float): Float { +public inline fun FloatArray.reduceRightIndexed(operation: (index: Int, Float, acc: Float) -> Float): Float { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11299,7 +11299,7 @@ public inline fun FloatArray.reduceRightIndexed(operation: (Int, Float, Float) - * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun DoubleArray.reduceRightIndexed(operation: (Int, Double, Double) -> Double): Double { +public inline fun DoubleArray.reduceRightIndexed(operation: (index: Int, Double, acc: Double) -> Double): Double { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11316,7 +11316,7 @@ public inline fun DoubleArray.reduceRightIndexed(operation: (Int, Double, Double * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun BooleanArray.reduceRightIndexed(operation: (Int, Boolean, Boolean) -> Boolean): Boolean { +public inline fun BooleanArray.reduceRightIndexed(operation: (index: Int, Boolean, acc: Boolean) -> Boolean): Boolean { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11333,7 +11333,7 @@ public inline fun BooleanArray.reduceRightIndexed(operation: (Int, Boolean, Bool * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharArray.reduceRightIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharArray.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty array can't be reduced.") var accumulator = get(index--) @@ -11783,7 +11783,7 @@ 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. */ -public inline fun Array.zip(other: Array, transform: (T, R) -> V): List { +public inline fun Array.zip(other: Array, transform: (a: T, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11795,7 +11795,7 @@ public inline fun Array.zip(other: Array, transform: (T, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ByteArray.zip(other: Array, transform: (Byte, R) -> V): List { +public inline fun ByteArray.zip(other: Array, transform: (a: Byte, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11807,7 +11807,7 @@ public inline fun ByteArray.zip(other: Array, transform: (Byte, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ShortArray.zip(other: Array, transform: (Short, R) -> V): List { +public inline fun ShortArray.zip(other: Array, transform: (a: Short, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11819,7 +11819,7 @@ public inline fun ShortArray.zip(other: Array, transform: (Short, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun IntArray.zip(other: Array, transform: (Int, R) -> V): List { +public inline fun IntArray.zip(other: Array, transform: (a: Int, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11831,7 +11831,7 @@ public inline fun IntArray.zip(other: Array, transform: (Int, R) - /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun LongArray.zip(other: Array, transform: (Long, R) -> V): List { +public inline fun LongArray.zip(other: Array, transform: (a: Long, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11843,7 +11843,7 @@ public inline fun LongArray.zip(other: Array, transform: (Long, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun FloatArray.zip(other: Array, transform: (Float, R) -> V): List { +public inline fun FloatArray.zip(other: Array, transform: (a: Float, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11855,7 +11855,7 @@ public inline fun FloatArray.zip(other: Array, transform: (Float, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun DoubleArray.zip(other: Array, transform: (Double, R) -> V): List { +public inline fun DoubleArray.zip(other: Array, transform: (a: Double, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11867,7 +11867,7 @@ public inline fun DoubleArray.zip(other: Array, transform: (Double /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun BooleanArray.zip(other: Array, transform: (Boolean, R) -> V): List { +public inline fun BooleanArray.zip(other: Array, transform: (a: Boolean, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11879,7 +11879,7 @@ public inline fun BooleanArray.zip(other: Array, transform: (Boole /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun CharArray.zip(other: Array, transform: (Char, R) -> V): List { +public inline fun CharArray.zip(other: Array, transform: (a: Char, b: R) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -11954,7 +11954,7 @@ 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. */ -public inline fun Array.zip(other: Iterable, transform: (T, R) -> V): List { +public inline fun Array.zip(other: Iterable, transform: (a: T, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11968,7 +11968,7 @@ public inline fun Array.zip(other: Iterable, transform: (T, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ByteArray.zip(other: Iterable, transform: (Byte, R) -> V): List { +public inline fun ByteArray.zip(other: Iterable, transform: (a: Byte, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11982,7 +11982,7 @@ public inline fun ByteArray.zip(other: Iterable, transform: (Byte, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ShortArray.zip(other: Iterable, transform: (Short, R) -> V): List { +public inline fun ShortArray.zip(other: Iterable, transform: (a: Short, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -11996,7 +11996,7 @@ public inline fun ShortArray.zip(other: Iterable, transform: (Short, R /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun IntArray.zip(other: Iterable, transform: (Int, R) -> V): List { +public inline fun IntArray.zip(other: Iterable, transform: (a: Int, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12010,7 +12010,7 @@ public inline fun IntArray.zip(other: Iterable, transform: (Int, R) -> /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun LongArray.zip(other: Iterable, transform: (Long, R) -> V): List { +public inline fun LongArray.zip(other: Iterable, transform: (a: Long, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12024,7 +12024,7 @@ public inline fun LongArray.zip(other: Iterable, transform: (Long, R) /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun FloatArray.zip(other: Iterable, transform: (Float, R) -> V): List { +public inline fun FloatArray.zip(other: Iterable, transform: (a: Float, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12038,7 +12038,7 @@ public inline fun FloatArray.zip(other: Iterable, transform: (Float, R /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun DoubleArray.zip(other: Iterable, transform: (Double, R) -> V): List { +public inline fun DoubleArray.zip(other: Iterable, transform: (a: Double, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12052,7 +12052,7 @@ public inline fun DoubleArray.zip(other: Iterable, transform: (Double, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun BooleanArray.zip(other: Iterable, transform: (Boolean, R) -> V): List { +public inline fun BooleanArray.zip(other: Iterable, transform: (a: Boolean, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12066,7 +12066,7 @@ public inline fun BooleanArray.zip(other: Iterable, transform: (Boolea /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun CharArray.zip(other: Iterable, transform: (Char, R) -> V): List { +public inline fun CharArray.zip(other: Iterable, transform: (a: Char, b: R) -> V): List { val arraySize = size val list = ArrayList(minOf(other.collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -12136,7 +12136,7 @@ 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. */ -public inline fun ByteArray.zip(other: ByteArray, transform: (Byte, Byte) -> V): List { +public inline fun ByteArray.zip(other: ByteArray, transform: (a: Byte, b: Byte) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12148,7 +12148,7 @@ public inline fun ByteArray.zip(other: ByteArray, transform: (Byte, Byte) -> /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun ShortArray.zip(other: ShortArray, transform: (Short, Short) -> V): List { +public inline fun ShortArray.zip(other: ShortArray, transform: (a: Short, b: Short) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12160,7 +12160,7 @@ public inline fun ShortArray.zip(other: ShortArray, transform: (Short, Short /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun IntArray.zip(other: IntArray, transform: (Int, Int) -> V): List { +public inline fun IntArray.zip(other: IntArray, transform: (a: Int, b: Int) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12172,7 +12172,7 @@ public inline fun IntArray.zip(other: IntArray, transform: (Int, Int) -> V): /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun LongArray.zip(other: LongArray, transform: (Long, Long) -> V): List { +public inline fun LongArray.zip(other: LongArray, transform: (a: Long, b: Long) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12184,7 +12184,7 @@ public inline fun LongArray.zip(other: LongArray, transform: (Long, Long) -> /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun FloatArray.zip(other: FloatArray, transform: (Float, Float) -> V): List { +public inline fun FloatArray.zip(other: FloatArray, transform: (a: Float, b: Float) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12196,7 +12196,7 @@ public inline fun FloatArray.zip(other: FloatArray, transform: (Float, Float /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun DoubleArray.zip(other: DoubleArray, transform: (Double, Double) -> V): List { +public inline fun DoubleArray.zip(other: DoubleArray, transform: (a: Double, b: Double) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12208,7 +12208,7 @@ public inline fun DoubleArray.zip(other: DoubleArray, transform: (Double, Do /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun BooleanArray.zip(other: BooleanArray, transform: (Boolean, Boolean) -> V): List { +public inline fun BooleanArray.zip(other: BooleanArray, transform: (a: Boolean, b: Boolean) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { @@ -12220,7 +12220,7 @@ public inline fun BooleanArray.zip(other: BooleanArray, transform: (Boolean, /** * Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection. */ -public inline fun CharArray.zip(other: CharArray, transform: (Char, Char) -> V): List { +public inline fun CharArray.zip(other: CharArray, transform: (a: Char, b: Char) -> V): List { val size = minOf(size, other.size) val list = ArrayList(size) for (i in 0..size-1) { diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index 2f77b7cde5c..8b06161a548 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -617,7 +617,7 @@ public inline fun Iterable.filter(predicate: (T) -> Boolean): List { * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun Iterable.filterIndexed(predicate: (Int, T) -> Boolean): List { +public inline fun Iterable.filterIndexed(predicate: (index: Int, T) -> Boolean): List { return filterIndexedTo(ArrayList(), predicate) } @@ -626,7 +626,7 @@ public inline fun Iterable.filterIndexed(predicate: (Int, T) -> Boolean): * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > Iterable.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C { +public inline fun > Iterable.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -1218,7 +1218,7 @@ public inline fun Iterable.map(transform: (T) -> R): List { * and returns the result of the transform applied to the element. */ @Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE") -public inline fun Iterable.mapIndexed(transform: (Int, T) -> R): List { +public inline fun Iterable.mapIndexed(transform: (index: Int, T) -> R): List { return mapIndexedTo(ArrayList(collectionSizeOrDefault(10)), transform) } @@ -1228,7 +1228,7 @@ public inline fun Iterable.mapIndexed(transform: (Int, T) -> R): List< * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun Iterable.mapIndexedNotNull(transform: (Int, T) -> R?): List { +public inline fun Iterable.mapIndexedNotNull(transform: (index: Int, T) -> R?): List { return mapIndexedNotNullTo(ArrayList(), transform) } @@ -1238,7 +1238,7 @@ public inline fun Iterable.mapIndexedNotNull(transform: (Int, T) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Iterable.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C { +public inline fun > Iterable.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -1249,7 +1249,7 @@ public inline fun > Iterable.mapIndex * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Iterable.mapIndexedTo(destination: C, transform: (Int, T) -> R): C { +public inline fun > Iterable.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -1416,7 +1416,7 @@ public inline fun Iterable.count(predicate: (T) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Iterable.fold(initial: R, operation: (R, T) -> R): R { +public inline fun Iterable.fold(initial: R, operation: (acc: R, T) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -1428,7 +1428,7 @@ public inline fun Iterable.fold(initial: R, operation: (R, T) -> R): R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun Iterable.foldIndexed(initial: R, operation: (Int, R, T) -> R): R { +public inline fun Iterable.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -1438,7 +1438,7 @@ public inline fun Iterable.foldIndexed(initial: R, operation: (Int, R, /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun List.foldRight(initial: R, operation: (T, R) -> R): R { +public inline fun List.foldRight(initial: R, operation: (T, acc: R) -> R): R { var accumulator = initial if (!isEmpty()) { val iterator = listIterator(size) @@ -1455,7 +1455,7 @@ public inline fun List.foldRight(initial: R, operation: (T, R) -> R): * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun List.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R { +public inline fun List.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R { var accumulator = initial if (!isEmpty()) { val iterator = listIterator(size) @@ -1480,7 +1480,7 @@ public inline fun Iterable.forEach(action: (T) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun Iterable.forEachIndexed(action: (Int, T) -> Unit): Unit { +public inline fun Iterable.forEachIndexed(action: (index: Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -1682,7 +1682,7 @@ public inline fun > C.onEach(action: (T) -> Unit): C { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Iterable.reduce(operation: (S, T) -> S): S { +public inline fun Iterable.reduce(operation: (acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty collection can't be reduced.") var accumulator: S = iterator.next() @@ -1698,7 +1698,7 @@ public inline fun Iterable.reduce(operation: (S, T) -> S): S { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun Iterable.reduceIndexed(operation: (Int, S, T) -> S): S { +public inline fun Iterable.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty collection can't be reduced.") var index = 1 @@ -1712,7 +1712,7 @@ public inline fun Iterable.reduceIndexed(operation: (Int, S, T) -> /** * Accumulates value starting with last element and applying [operation] from right to left to each element and current accumulator value. */ -public inline fun List.reduceRight(operation: (T, S) -> S): S { +public inline fun List.reduceRight(operation: (T, acc: S) -> S): S { val iterator = listIterator(size) if (!iterator.hasPrevious()) throw UnsupportedOperationException("Empty list can't be reduced.") @@ -1729,7 +1729,7 @@ public inline fun List.reduceRight(operation: (T, S) -> S): S { * @param [operation] function that takes the index of an element, the element itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun List.reduceRightIndexed(operation: (Int, T, S) -> S): S { +public inline fun List.reduceRightIndexed(operation: (index: Int, T, acc: S) -> S): S { val iterator = listIterator(size) if (!iterator.hasPrevious()) throw UnsupportedOperationException("Empty list can't be reduced.") @@ -1968,7 +1968,7 @@ 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. */ -public inline fun Iterable.zip(other: Array, transform: (T, R) -> V): List { +public inline fun Iterable.zip(other: Array, transform: (a: T, b: R) -> V): List { val arraySize = other.size val list = ArrayList(minOf(collectionSizeOrDefault(10), arraySize)) var i = 0 @@ -1989,7 +1989,7 @@ 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. */ -public inline fun Iterable.zip(other: Iterable, transform: (T, R) -> V): List { +public inline fun Iterable.zip(other: Iterable, transform: (a: T, b: R) -> V): List { val first = iterator() val second = other.iterator() val list = ArrayList(minOf(collectionSizeOrDefault(10), other.collectionSizeOrDefault(10))) diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index 082875cd3ac..c8d17c9211d 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -313,7 +313,7 @@ public fun Sequence.filter(predicate: (T) -> Boolean): Sequence { * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public fun Sequence.filterIndexed(predicate: (Int, T) -> Boolean): Sequence { +public fun Sequence.filterIndexed(predicate: (index: Int, T) -> Boolean): Sequence { // TODO: Rewrite with generalized MapFilterIndexingSequence return TransformingSequence(FilteringSequence(IndexingSequence(this), true, { predicate(it.index, it.value) }), { it.value }) } @@ -323,7 +323,7 @@ public fun Sequence.filterIndexed(predicate: (Int, T) -> Boolean): Sequen * @param [predicate] function that takes the index of an element and the element itself * and returns the result of predicate evaluation on the element. */ -public inline fun > Sequence.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C { +public inline fun > Sequence.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.add(element) } @@ -689,7 +689,7 @@ public fun Sequence.map(transform: (T) -> R): Sequence { * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public fun Sequence.mapIndexed(transform: (Int, T) -> R): Sequence { +public fun Sequence.mapIndexed(transform: (index: Int, T) -> R): Sequence { return TransformingIndexedSequence(this, transform) } @@ -699,7 +699,7 @@ public fun Sequence.mapIndexed(transform: (Int, T) -> R): Sequence * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public fun Sequence.mapIndexedNotNull(transform: (Int, T) -> R?): Sequence { +public fun Sequence.mapIndexedNotNull(transform: (index: Int, T) -> R?): Sequence { return TransformingIndexedSequence(this, transform).filterNotNull() } @@ -709,7 +709,7 @@ public fun Sequence.mapIndexedNotNull(transform: (Int, T) -> R?) * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C { +public inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -720,7 +720,7 @@ public inline fun > Sequence.mapIndex * @param [transform] function that takes the index of an element and the element itself * and returns the result of the transform applied to the element. */ -public inline fun > Sequence.mapIndexedTo(destination: C, transform: (Int, T) -> R): C { +public inline fun > Sequence.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -836,7 +836,7 @@ public inline fun Sequence.count(predicate: (T) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Sequence.fold(initial: R, operation: (R, T) -> R): R { +public inline fun Sequence.fold(initial: R, operation: (acc: R, T) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -848,7 +848,7 @@ public inline fun Sequence.fold(initial: R, operation: (R, T) -> R): R * @param [operation] function that takes the index of an element, current accumulator value * and the element itself, and calculates the next accumulator value. */ -public inline fun Sequence.foldIndexed(initial: R, operation: (Int, R, T) -> R): R { +public inline fun Sequence.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -867,7 +867,7 @@ public inline fun Sequence.forEach(action: (T) -> Unit): Unit { * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ -public inline fun Sequence.forEachIndexed(action: (Int, T) -> Unit): Unit { +public inline fun Sequence.forEachIndexed(action: (index: Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -1072,7 +1072,7 @@ public fun Sequence.onEach(action: (T) -> Unit): Sequence { /** * Accumulates value starting with the first element and applying [operation] from left to right to current accumulator value and each element. */ -public inline fun Sequence.reduce(operation: (S, T) -> S): S { +public inline fun Sequence.reduce(operation: (acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty sequence can't be reduced.") var accumulator: S = iterator.next() @@ -1088,7 +1088,7 @@ public inline fun Sequence.reduce(operation: (S, T) -> S): S { * @param [operation] function that takes the index of an element, current accumulator value * and the element itself and calculates the next accumulator value. */ -public inline fun Sequence.reduceIndexed(operation: (Int, S, T) -> S): S { +public inline fun Sequence.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S { val iterator = this.iterator() if (!iterator.hasNext()) throw UnsupportedOperationException("Empty sequence can't be reduced.") var index = 1 @@ -1274,7 +1274,7 @@ public infix fun Sequence.zip(other: Sequence): Sequence /** * 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. */ -public fun Sequence.zip(other: Sequence, transform: (T, R) -> V): Sequence { +public fun Sequence.zip(other: Sequence, transform: (a: T, b: R) -> V): Sequence { return MergingSequence(this, other, transform) } diff --git a/libraries/stdlib/src/generated/_Strings.kt b/libraries/stdlib/src/generated/_Strings.kt index 65051e84418..354a0e3439b 100644 --- a/libraries/stdlib/src/generated/_Strings.kt +++ b/libraries/stdlib/src/generated/_Strings.kt @@ -307,7 +307,7 @@ public inline fun String.filter(predicate: (Char) -> Boolean): String { * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public inline fun CharSequence.filterIndexed(predicate: (Int, Char) -> Boolean): CharSequence { +public inline fun CharSequence.filterIndexed(predicate: (index: Int, Char) -> Boolean): CharSequence { return filterIndexedTo(StringBuilder(), predicate) } @@ -316,7 +316,7 @@ public inline fun CharSequence.filterIndexed(predicate: (Int, Char) -> Boolean): * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public inline fun String.filterIndexed(predicate: (Int, Char) -> Boolean): String { +public inline fun String.filterIndexed(predicate: (index: Int, Char) -> Boolean): String { return filterIndexedTo(StringBuilder(), predicate).toString() } @@ -325,7 +325,7 @@ public inline fun String.filterIndexed(predicate: (Int, Char) -> Boolean): Strin * @param [predicate] function that takes the index of a character and the character itself * and returns the result of predicate evaluation on the character. */ -public inline fun CharSequence.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C { +public inline fun CharSequence.filterIndexedTo(destination: C, predicate: (index: Int, Char) -> Boolean): C { forEachIndexed { index, element -> if (predicate(index, element)) destination.append(element) } @@ -736,7 +736,7 @@ public inline fun CharSequence.map(transform: (Char) -> R): List { * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun CharSequence.mapIndexed(transform: (Int, Char) -> R): List { +public inline fun CharSequence.mapIndexed(transform: (index: Int, Char) -> R): List { return mapIndexedTo(ArrayList(length), transform) } @@ -746,7 +746,7 @@ public inline fun CharSequence.mapIndexed(transform: (Int, Char) -> R): List * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun CharSequence.mapIndexedNotNull(transform: (Int, Char) -> R?): List { +public inline fun CharSequence.mapIndexedNotNull(transform: (index: Int, Char) -> R?): List { return mapIndexedNotNullTo(ArrayList(), transform) } @@ -756,7 +756,7 @@ public inline fun CharSequence.mapIndexedNotNull(transform: (Int, Char * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun > CharSequence.mapIndexedNotNullTo(destination: C, transform: (Int, Char) -> R?): C { +public inline fun > CharSequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, Char) -> R?): C { forEachIndexed { index, element -> transform(index, element)?.let { destination.add(it) } } return destination } @@ -767,7 +767,7 @@ public inline fun > CharSequence.mapIndexed * @param [transform] function that takes the index of a character and the character itself * and returns the result of the transform applied to the character. */ -public inline fun > CharSequence.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C { +public inline fun > CharSequence.mapIndexedTo(destination: C, transform: (index: Int, Char) -> R): C { var index = 0 for (item in this) destination.add(transform(index++, item)) @@ -852,7 +852,7 @@ public inline fun CharSequence.count(predicate: (Char) -> Boolean): Int { /** * Accumulates value starting with [initial] value and applying [operation] from left to right to current accumulator value and each character. */ -public inline fun CharSequence.fold(initial: R, operation: (R, Char) -> R): R { +public inline fun CharSequence.fold(initial: R, operation: (acc: R, Char) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator @@ -864,7 +864,7 @@ public inline fun CharSequence.fold(initial: R, operation: (R, Char) -> R): * @param [operation] function that takes the index of a character, current accumulator value * and the character itself, and calculates the next accumulator value. */ -public inline fun CharSequence.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R { +public inline fun CharSequence.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R { var index = 0 var accumulator = initial for (element in this) accumulator = operation(index++, accumulator, element) @@ -874,7 +874,7 @@ public inline fun CharSequence.foldIndexed(initial: R, operation: (Int, R, C /** * Accumulates value starting with [initial] value and applying [operation] from right to left to each character and current accumulator value. */ -public inline fun CharSequence.foldRight(initial: R, operation: (Char, R) -> R): R { +public inline fun CharSequence.foldRight(initial: R, operation: (Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -889,7 +889,7 @@ public inline fun CharSequence.foldRight(initial: R, operation: (Char, R) -> * @param [operation] function that takes the index of a character, the character itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharSequence.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R { +public inline fun CharSequence.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R { var index = lastIndex var accumulator = initial while (index >= 0) { @@ -911,7 +911,7 @@ public inline fun CharSequence.forEach(action: (Char) -> Unit): Unit { * @param [action] function that takes the index of a character and the character itself * and performs the desired action on the character. */ -public inline fun CharSequence.forEachIndexed(action: (Int, Char) -> Unit): Unit { +public inline fun CharSequence.forEachIndexed(action: (index: Int, Char) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } @@ -1031,7 +1031,7 @@ public inline fun S.onEach(action: (Char) -> Unit): S { /** * Accumulates value starting with the first character and applying [operation] from left to right to current accumulator value and each character. */ -public inline fun CharSequence.reduce(operation: (Char, Char) -> Char): Char { +public inline fun CharSequence.reduce(operation: (acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = this[0] @@ -1047,7 +1047,7 @@ public inline fun CharSequence.reduce(operation: (Char, Char) -> Char): Char { * @param [operation] function that takes the index of a character, current accumulator value * and the character itself and calculates the next accumulator value. */ -public inline fun CharSequence.reduceIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharSequence.reduceIndexed(operation: (index: Int, acc: Char, Char) -> Char): Char { if (isEmpty()) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = this[0] @@ -1060,7 +1060,7 @@ public inline fun CharSequence.reduceIndexed(operation: (Int, Char, Char) -> Cha /** * Accumulates value starting with last character and applying [operation] from right to left to each character and current accumulator value. */ -public inline fun CharSequence.reduceRight(operation: (Char, Char) -> Char): Char { +public inline fun CharSequence.reduceRight(operation: (Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = get(index--) @@ -1076,7 +1076,7 @@ public inline fun CharSequence.reduceRight(operation: (Char, Char) -> Char): Cha * @param [operation] function that takes the index of a character, the character itself * and current accumulator value, and calculates the next accumulator value. */ -public inline fun CharSequence.reduceRightIndexed(operation: (Int, Char, Char) -> Char): Char { +public inline fun CharSequence.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char { var index = lastIndex if (index < 0) throw UnsupportedOperationException("Empty char sequence can't be reduced.") var accumulator = get(index--) @@ -1155,7 +1155,7 @@ public infix fun CharSequence.zip(other: CharSequence): List> { /** * Returns a list of values built from characters of both char sequences with same indexes using provided [transform]. List has length of shortest char sequence. */ -public inline fun CharSequence.zip(other: CharSequence, transform: (Char, Char) -> V): List { +public inline fun CharSequence.zip(other: CharSequence, transform: (a: Char, b: Char) -> V): List { val length = minOf(this.length, other.length) val list = ArrayList(length) for (i in 0..length-1) { diff --git a/libraries/stdlib/src/kotlin/comparisons/Comparisons.kt b/libraries/stdlib/src/kotlin/comparisons/Comparisons.kt index 4d224ed9846..d44974678a9 100644 --- a/libraries/stdlib/src/kotlin/comparisons/Comparisons.kt +++ b/libraries/stdlib/src/kotlin/comparisons/Comparisons.kt @@ -196,7 +196,7 @@ public inline fun Comparator.thenByDescending(comparator: Comparator Comparator.thenComparator(crossinline comparison: (T, T) -> Int): Comparator { +public inline fun Comparator.thenComparator(crossinline comparison: (a: T, b: T) -> Int): Comparator { return object : Comparator { public override fun compare(a: T, b: T): Int { val previousCompare = this@thenComparator.compare(a, b) diff --git a/libraries/stdlib/src/kotlin/io/FileReadWrite.kt b/libraries/stdlib/src/kotlin/io/FileReadWrite.kt index 91f716f0962..18d323dea3e 100644 --- a/libraries/stdlib/src/kotlin/io/FileReadWrite.kt +++ b/libraries/stdlib/src/kotlin/io/FileReadWrite.kt @@ -115,7 +115,7 @@ public fun File.appendText(text: String, charset: Charset = Charsets.UTF_8): Uni * * @param action function to process file blocks. */ -public fun File.forEachBlock(action: (ByteArray, Int) -> Unit): Unit = forEachBlock(DEFAULT_BLOCK_SIZE, action) +public fun File.forEachBlock(action: (buffer: ByteArray, bytesRead: Int) -> Unit): Unit = forEachBlock(DEFAULT_BLOCK_SIZE, action) /** * Reads file by byte blocks and calls [action] for each block read. @@ -126,7 +126,7 @@ public fun File.forEachBlock(action: (ByteArray, Int) -> Unit): Unit = forEachBl * @param action function to process file blocks. * @param blockSize size of a block, replaced by 512 if it's less, 4096 by default. */ -public fun File.forEachBlock(blockSize: Int, action: (ByteArray, Int) -> Unit): Unit { +public fun File.forEachBlock(blockSize: Int, action: (buffer: ByteArray, bytesRead: Int) -> Unit): Unit { val arr = ByteArray(blockSize.coerceAtLeast(MINIMUM_BLOCK_SIZE)) val fis = FileInputStream(this) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt index a9f49dde9d6..c7df78beaa4 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt @@ -351,7 +351,7 @@ fun aggregates(): List { body(Maps) { "return entries.maxWith(comparator)" } } - templates add f("foldIndexed(initial: R, operation: (Int, R, T) -> R)") { + templates add f("foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R)") { inline(true) include(CharSequences) @@ -375,7 +375,7 @@ fun aggregates(): List { } } - templates add f("foldRightIndexed(initial: R, operation: (Int, T, R) -> R)") { + templates add f("foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R)") { inline(true) only(CharSequences, Lists, ArraysOfObjects, ArraysOfPrimitives) @@ -415,7 +415,7 @@ fun aggregates(): List { } } - templates add f("fold(initial: R, operation: (R, T) -> R)") { + templates add f("fold(initial: R, operation: (acc: R, T) -> R)") { inline(true) include(CharSequences) @@ -431,7 +431,7 @@ fun aggregates(): List { } } - templates add f("foldRight(initial: R, operation: (T, R) -> R)") { + templates add f("foldRight(initial: R, operation: (T, acc: R) -> R)") { inline(true) only(CharSequences, Lists, ArraysOfObjects, ArraysOfPrimitives) @@ -462,7 +462,7 @@ fun aggregates(): List { } } - templates add f("reduceIndexed(operation: (Int, T, T) -> T)") { + templates add f("reduceIndexed(operation: (index: Int, acc: T, T) -> T)") { inline(true) only(ArraysOfPrimitives, CharSequences) @@ -489,7 +489,7 @@ fun aggregates(): List { } } - templates add f("reduceIndexed(operation: (Int, S, T) -> S)") { + templates add f("reduceIndexed(operation: (index: Int, acc: S, T) -> S)") { inline(true) only(ArraysOfObjects, Iterables, Sequences) @@ -531,7 +531,7 @@ fun aggregates(): List { } } - templates add f("reduceRightIndexed(operation: (Int, T, T) -> T)") { + templates add f("reduceRightIndexed(operation: (index: Int, T, acc: T) -> T)") { inline(true) only(CharSequences, ArraysOfPrimitives) @@ -560,7 +560,7 @@ fun aggregates(): List { } } - templates add f("reduceRightIndexed(operation: (Int, T, S) -> S)") { + templates add f("reduceRightIndexed(operation: (index: Int, T, acc: S) -> S)") { inline(true) only(Lists, ArraysOfObjects) @@ -606,7 +606,7 @@ fun aggregates(): List { } } - templates add f("reduce(operation: (T, T) -> T)") { + templates add f("reduce(operation: (acc: T, T) -> T)") { inline(true) only(ArraysOfPrimitives, CharSequences) @@ -626,7 +626,7 @@ fun aggregates(): List { } } - templates add f("reduce(operation: (S, T) -> S)") { + templates add f("reduce(operation: (acc: S, T) -> S)") { inline(true) only(ArraysOfObjects, Iterables, Sequences) @@ -660,7 +660,7 @@ fun aggregates(): List { } } - templates add f("reduceRight(operation: (T, T) -> T)") { + templates add f("reduceRight(operation: (T, acc: T) -> T)") { inline(true) only(CharSequences, ArraysOfPrimitives) @@ -681,7 +681,7 @@ fun aggregates(): List { } } - templates add f("reduceRight(operation: (T, S) -> S)") { + templates add f("reduceRight(operation: (T, acc: S) -> S)") { inline(true) only(Lists, ArraysOfObjects) @@ -773,7 +773,7 @@ fun aggregates(): List { include(Maps, CharSequences) } - templates add f("forEachIndexed(action: (Int, T) -> Unit)") { + templates add f("forEachIndexed(action: (index: Int, T) -> Unit)") { inline(true) include(CharSequences) doc { f -> diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Filtering.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Filtering.kt index a68692e1d92..12eee5be962 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Filtering.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Filtering.kt @@ -468,7 +468,7 @@ fun filtering(): List { } } - templates add f("filterIndexed(predicate: (Int, T) -> Boolean)") { + templates add f("filterIndexed(predicate: (index: Int, T) -> Boolean)") { inline(true) doc { f -> @@ -506,7 +506,7 @@ fun filtering(): List { } - templates add f("filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean)") { + templates add f("filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean)") { inline(true) include(CharSequences) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt index c5a5e340045..3c8c48c8deb 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Generators.kt @@ -530,7 +530,7 @@ fun generators(): List { } } - templates add f("zip(other: Iterable, transform: (T, R) -> V)") { + templates add f("zip(other: Iterable, transform: (a: T, b: R) -> V)") { exclude(Sequences) doc { """ @@ -566,7 +566,7 @@ fun generators(): List { } } - templates add f("zip(other: Array, transform: (T, R) -> V)") { + templates add f("zip(other: Array, transform: (a: T, b: R) -> V)") { exclude(Sequences) doc { """ @@ -602,7 +602,7 @@ fun generators(): List { } - templates add f("zip(other: SELF, transform: (T, T) -> V)") { + templates add f("zip(other: SELF, transform: (a: T, b: T) -> V)") { only(ArraysOfPrimitives) doc { """ @@ -624,7 +624,7 @@ fun generators(): List { } } - templates add f("zip(other: Sequence, transform: (T, R) -> V)") { + templates add f("zip(other: Sequence, transform: (a: T, b: R) -> V)") { only(Sequences) doc { """ @@ -641,7 +641,7 @@ fun generators(): List { } } - templates add f("zip(other: CharSequence, transform: (Char, Char) -> V)") { + templates add f("zip(other: CharSequence, transform: (a: Char, b: Char) -> V)") { only(CharSequences) doc { """ diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt index 6c1dda927a6..5f8ca750d0e 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Mapping.kt @@ -23,7 +23,7 @@ fun mapping(): List { } } - templates add f("mapIndexed(transform: (Int, T) -> R)") { + templates add f("mapIndexed(transform: (index: Int, T) -> R)") { inline(true) doc { f -> @@ -107,7 +107,7 @@ fun mapping(): List { } - templates add f("mapIndexedNotNull(transform: (Int, T) -> R?)") { + templates add f("mapIndexedNotNull(transform: (index: Int, T) -> R?)") { inline(true) include(CharSequences) exclude(ArraysOfPrimitives) @@ -155,7 +155,7 @@ fun mapping(): List { include(Maps, CharSequences) } - templates add f("mapIndexedTo(destination: C, transform: (Int, T) -> R)") { + templates add f("mapIndexedTo(destination: C, transform: (index: Int, T) -> R)") { inline(true) doc { f -> @@ -202,7 +202,7 @@ fun mapping(): List { } } - templates add f("mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?)") { + templates add f("mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?)") { inline(true) include(CharSequences) exclude(ArraysOfPrimitives) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt index c59406991b3..cea96e9363c 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJS.kt @@ -21,7 +21,7 @@ import templates.Family.* fun specialJS(): List { val templates = arrayListOf() - templates add f("sort(noinline comparison: (T, T) -> Int)") { + templates add f("sort(noinline comparison: (a: T, b: T) -> Int)") { only(ArraysOfObjects, ArraysOfPrimitives) exclude(PrimitiveType.Boolean) inline(true)