From 7cd5eeb24dc045b8d893ee14d480d789ab06c030 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Fri, 15 Sep 2017 15:27:39 +0300 Subject: [PATCH] Regenerate common stdlib: use 'expect' instead 'header' --- .../stdlib/common/src/generated/_Arrays.kt | 2534 ++++++++--------- .../common/src/generated/_Collections.kt | 368 +-- .../common/src/generated/_Comparisons.kt | 64 +- .../stdlib/common/src/generated/_Maps.kt | 44 +- .../stdlib/common/src/generated/_Ranges.kt | 218 +- .../stdlib/common/src/generated/_Sequences.kt | 250 +- .../stdlib/common/src/generated/_Sets.kt | 20 +- .../stdlib/common/src/generated/_Strings.kt | 222 +- .../src/templates/engine/Engine.kt | 2 +- 9 files changed, 1861 insertions(+), 1861 deletions(-) diff --git a/libraries/stdlib/common/src/generated/_Arrays.kt b/libraries/stdlib/common/src/generated/_Arrays.kt index 7d92e5f9509..594dfdcb4be 100644 --- a/libraries/stdlib/common/src/generated/_Arrays.kt +++ b/libraries/stdlib/common/src/generated/_Arrays.kt @@ -14,2792 +14,2792 @@ import kotlin.comparisons.* * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun Array.component1(): T +public expect inline operator fun Array.component1(): T /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ByteArray.component1(): Byte +public expect inline operator fun ByteArray.component1(): Byte /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ShortArray.component1(): Short +public expect inline operator fun ShortArray.component1(): Short /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun IntArray.component1(): Int +public expect inline operator fun IntArray.component1(): Int /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun LongArray.component1(): Long +public expect inline operator fun LongArray.component1(): Long /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun FloatArray.component1(): Float +public expect inline operator fun FloatArray.component1(): Float /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun DoubleArray.component1(): Double +public expect inline operator fun DoubleArray.component1(): Double /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun BooleanArray.component1(): Boolean +public expect inline operator fun BooleanArray.component1(): Boolean /** * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun CharArray.component1(): Char +public expect inline operator fun CharArray.component1(): Char /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun Array.component2(): T +public expect inline operator fun Array.component2(): T /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ByteArray.component2(): Byte +public expect inline operator fun ByteArray.component2(): Byte /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ShortArray.component2(): Short +public expect inline operator fun ShortArray.component2(): Short /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun IntArray.component2(): Int +public expect inline operator fun IntArray.component2(): Int /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun LongArray.component2(): Long +public expect inline operator fun LongArray.component2(): Long /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun FloatArray.component2(): Float +public expect inline operator fun FloatArray.component2(): Float /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun DoubleArray.component2(): Double +public expect inline operator fun DoubleArray.component2(): Double /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun BooleanArray.component2(): Boolean +public expect inline operator fun BooleanArray.component2(): Boolean /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun CharArray.component2(): Char +public expect inline operator fun CharArray.component2(): Char /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun Array.component3(): T +public expect inline operator fun Array.component3(): T /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ByteArray.component3(): Byte +public expect inline operator fun ByteArray.component3(): Byte /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ShortArray.component3(): Short +public expect inline operator fun ShortArray.component3(): Short /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun IntArray.component3(): Int +public expect inline operator fun IntArray.component3(): Int /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun LongArray.component3(): Long +public expect inline operator fun LongArray.component3(): Long /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun FloatArray.component3(): Float +public expect inline operator fun FloatArray.component3(): Float /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun DoubleArray.component3(): Double +public expect inline operator fun DoubleArray.component3(): Double /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun BooleanArray.component3(): Boolean +public expect inline operator fun BooleanArray.component3(): Boolean /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun CharArray.component3(): Char +public expect inline operator fun CharArray.component3(): Char /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun Array.component4(): T +public expect inline operator fun Array.component4(): T /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ByteArray.component4(): Byte +public expect inline operator fun ByteArray.component4(): Byte /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ShortArray.component4(): Short +public expect inline operator fun ShortArray.component4(): Short /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun IntArray.component4(): Int +public expect inline operator fun IntArray.component4(): Int /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun LongArray.component4(): Long +public expect inline operator fun LongArray.component4(): Long /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun FloatArray.component4(): Float +public expect inline operator fun FloatArray.component4(): Float /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun DoubleArray.component4(): Double +public expect inline operator fun DoubleArray.component4(): Double /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun BooleanArray.component4(): Boolean +public expect inline operator fun BooleanArray.component4(): Boolean /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun CharArray.component4(): Char +public expect inline operator fun CharArray.component4(): Char /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun Array.component5(): T +public expect inline operator fun Array.component5(): T /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ByteArray.component5(): Byte +public expect inline operator fun ByteArray.component5(): Byte /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun ShortArray.component5(): Short +public expect inline operator fun ShortArray.component5(): Short /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun IntArray.component5(): Int +public expect inline operator fun IntArray.component5(): Int /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun LongArray.component5(): Long +public expect inline operator fun LongArray.component5(): Long /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun FloatArray.component5(): Float +public expect inline operator fun FloatArray.component5(): Float /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun DoubleArray.component5(): Double +public expect inline operator fun DoubleArray.component5(): Double /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun BooleanArray.component5(): Boolean +public expect inline operator fun BooleanArray.component5(): Boolean /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun CharArray.component5(): Char +public expect inline operator fun CharArray.component5(): Char /** * Returns `true` if [element] is found in the array. */ -public header operator fun <@kotlin.internal.OnlyInputTypes T> Array.contains(element: T): Boolean +public expect operator fun <@kotlin.internal.OnlyInputTypes T> Array.contains(element: T): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun ByteArray.contains(element: Byte): Boolean +public expect operator fun ByteArray.contains(element: Byte): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun ShortArray.contains(element: Short): Boolean +public expect operator fun ShortArray.contains(element: Short): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun IntArray.contains(element: Int): Boolean +public expect operator fun IntArray.contains(element: Int): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun LongArray.contains(element: Long): Boolean +public expect operator fun LongArray.contains(element: Long): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun FloatArray.contains(element: Float): Boolean +public expect operator fun FloatArray.contains(element: Float): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun DoubleArray.contains(element: Double): Boolean +public expect operator fun DoubleArray.contains(element: Double): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun BooleanArray.contains(element: Boolean): Boolean +public expect operator fun BooleanArray.contains(element: Boolean): Boolean /** * Returns `true` if [element] is found in the array. */ -public header operator fun CharArray.contains(element: Char): Boolean +public expect operator fun CharArray.contains(element: Char): Boolean /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun Array.elementAt(index: Int): T +public expect inline fun Array.elementAt(index: Int): T /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.elementAt(index: Int): Byte +public expect inline fun ByteArray.elementAt(index: Int): Byte /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.elementAt(index: Int): Short +public expect inline fun ShortArray.elementAt(index: Int): Short /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.elementAt(index: Int): Int +public expect inline fun IntArray.elementAt(index: Int): Int /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.elementAt(index: Int): Long +public expect inline fun LongArray.elementAt(index: Int): Long /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.elementAt(index: Int): Float +public expect inline fun FloatArray.elementAt(index: Int): Float /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.elementAt(index: Int): Double +public expect inline fun DoubleArray.elementAt(index: Int): Double /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.elementAt(index: Int): Boolean +public expect inline fun BooleanArray.elementAt(index: Int): Boolean /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.elementAt(index: Int): Char +public expect inline fun CharArray.elementAt(index: Int): Char /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun Array.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T +public expect inline fun Array.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Byte): Byte +public expect inline fun ByteArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Byte): Byte /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Short): Short +public expect inline fun ShortArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Short): Short /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Int): Int +public expect inline fun IntArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Int): Int /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Long): Long +public expect inline fun LongArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Long): Long /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Float): Float +public expect inline fun FloatArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Float): Float /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Double): Double +public expect inline fun DoubleArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Double): Double /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Boolean): Boolean +public expect inline fun BooleanArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Boolean): Boolean /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Char): Char +public expect inline fun CharArray.elementAtOrElse(index: Int, defaultValue: (Int) -> Char): Char /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun Array.elementAtOrNull(index: Int): T? +public expect inline fun Array.elementAtOrNull(index: Int): T? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.elementAtOrNull(index: Int): Byte? +public expect inline fun ByteArray.elementAtOrNull(index: Int): Byte? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.elementAtOrNull(index: Int): Short? +public expect inline fun ShortArray.elementAtOrNull(index: Int): Short? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.elementAtOrNull(index: Int): Int? +public expect inline fun IntArray.elementAtOrNull(index: Int): Int? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.elementAtOrNull(index: Int): Long? +public expect inline fun LongArray.elementAtOrNull(index: Int): Long? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.elementAtOrNull(index: Int): Float? +public expect inline fun FloatArray.elementAtOrNull(index: Int): Float? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.elementAtOrNull(index: Int): Double? +public expect inline fun DoubleArray.elementAtOrNull(index: Int): Double? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.elementAtOrNull(index: Int): Boolean? +public expect inline fun BooleanArray.elementAtOrNull(index: Int): Boolean? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.elementAtOrNull(index: Int): Char? +public expect inline fun CharArray.elementAtOrNull(index: Int): Char? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun Array.find(predicate: (T) -> Boolean): T? +public expect inline fun Array.find(predicate: (T) -> Boolean): T? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.find(predicate: (Byte) -> Boolean): Byte? +public expect inline fun ByteArray.find(predicate: (Byte) -> Boolean): Byte? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.find(predicate: (Short) -> Boolean): Short? +public expect inline fun ShortArray.find(predicate: (Short) -> Boolean): Short? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.find(predicate: (Int) -> Boolean): Int? +public expect inline fun IntArray.find(predicate: (Int) -> Boolean): Int? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.find(predicate: (Long) -> Boolean): Long? +public expect inline fun LongArray.find(predicate: (Long) -> Boolean): Long? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.find(predicate: (Float) -> Boolean): Float? +public expect inline fun FloatArray.find(predicate: (Float) -> Boolean): Float? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.find(predicate: (Double) -> Boolean): Double? +public expect inline fun DoubleArray.find(predicate: (Double) -> Boolean): Double? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.find(predicate: (Boolean) -> Boolean): Boolean? +public expect inline fun BooleanArray.find(predicate: (Boolean) -> Boolean): Boolean? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.find(predicate: (Char) -> Boolean): Char? +public expect inline fun CharArray.find(predicate: (Char) -> Boolean): Char? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun Array.findLast(predicate: (T) -> Boolean): T? +public expect inline fun Array.findLast(predicate: (T) -> Boolean): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.findLast(predicate: (Byte) -> Boolean): Byte? +public expect inline fun ByteArray.findLast(predicate: (Byte) -> Boolean): Byte? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.findLast(predicate: (Short) -> Boolean): Short? +public expect inline fun ShortArray.findLast(predicate: (Short) -> Boolean): Short? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.findLast(predicate: (Int) -> Boolean): Int? +public expect inline fun IntArray.findLast(predicate: (Int) -> Boolean): Int? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.findLast(predicate: (Long) -> Boolean): Long? +public expect inline fun LongArray.findLast(predicate: (Long) -> Boolean): Long? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.findLast(predicate: (Float) -> Boolean): Float? +public expect inline fun FloatArray.findLast(predicate: (Float) -> Boolean): Float? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.findLast(predicate: (Double) -> Boolean): Double? +public expect inline fun DoubleArray.findLast(predicate: (Double) -> Boolean): Double? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.findLast(predicate: (Boolean) -> Boolean): Boolean? +public expect inline fun BooleanArray.findLast(predicate: (Boolean) -> Boolean): Boolean? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.findLast(predicate: (Char) -> Boolean): Char? +public expect inline fun CharArray.findLast(predicate: (Char) -> Boolean): Char? /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun Array.first(): T +public expect fun Array.first(): T /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun ByteArray.first(): Byte +public expect fun ByteArray.first(): Byte /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun ShortArray.first(): Short +public expect fun ShortArray.first(): Short /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun IntArray.first(): Int +public expect fun IntArray.first(): Int /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun LongArray.first(): Long +public expect fun LongArray.first(): Long /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun FloatArray.first(): Float +public expect fun FloatArray.first(): Float /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun DoubleArray.first(): Double +public expect fun DoubleArray.first(): Double /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun BooleanArray.first(): Boolean +public expect fun BooleanArray.first(): Boolean /** * Returns first element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun CharArray.first(): Char +public expect fun CharArray.first(): Char /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun Array.first(predicate: (T) -> Boolean): T +public expect inline fun Array.first(predicate: (T) -> Boolean): T /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun ByteArray.first(predicate: (Byte) -> Boolean): Byte +public expect inline fun ByteArray.first(predicate: (Byte) -> Boolean): Byte /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun ShortArray.first(predicate: (Short) -> Boolean): Short +public expect inline fun ShortArray.first(predicate: (Short) -> Boolean): Short /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun IntArray.first(predicate: (Int) -> Boolean): Int +public expect inline fun IntArray.first(predicate: (Int) -> Boolean): Int /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun LongArray.first(predicate: (Long) -> Boolean): Long +public expect inline fun LongArray.first(predicate: (Long) -> Boolean): Long /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun FloatArray.first(predicate: (Float) -> Boolean): Float +public expect inline fun FloatArray.first(predicate: (Float) -> Boolean): Float /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun DoubleArray.first(predicate: (Double) -> Boolean): Double +public expect inline fun DoubleArray.first(predicate: (Double) -> Boolean): Double /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun BooleanArray.first(predicate: (Boolean) -> Boolean): Boolean +public expect inline fun BooleanArray.first(predicate: (Boolean) -> Boolean): Boolean /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun CharArray.first(predicate: (Char) -> Boolean): Char +public expect inline fun CharArray.first(predicate: (Char) -> Boolean): Char /** * Returns the first element, or `null` if the array is empty. */ -public header fun Array.firstOrNull(): T? +public expect fun Array.firstOrNull(): T? /** * Returns the first element, or `null` if the array is empty. */ -public header fun ByteArray.firstOrNull(): Byte? +public expect fun ByteArray.firstOrNull(): Byte? /** * Returns the first element, or `null` if the array is empty. */ -public header fun ShortArray.firstOrNull(): Short? +public expect fun ShortArray.firstOrNull(): Short? /** * Returns the first element, or `null` if the array is empty. */ -public header fun IntArray.firstOrNull(): Int? +public expect fun IntArray.firstOrNull(): Int? /** * Returns the first element, or `null` if the array is empty. */ -public header fun LongArray.firstOrNull(): Long? +public expect fun LongArray.firstOrNull(): Long? /** * Returns the first element, or `null` if the array is empty. */ -public header fun FloatArray.firstOrNull(): Float? +public expect fun FloatArray.firstOrNull(): Float? /** * Returns the first element, or `null` if the array is empty. */ -public header fun DoubleArray.firstOrNull(): Double? +public expect fun DoubleArray.firstOrNull(): Double? /** * Returns the first element, or `null` if the array is empty. */ -public header fun BooleanArray.firstOrNull(): Boolean? +public expect fun BooleanArray.firstOrNull(): Boolean? /** * Returns the first element, or `null` if the array is empty. */ -public header fun CharArray.firstOrNull(): Char? +public expect fun CharArray.firstOrNull(): Char? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun Array.firstOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Array.firstOrNull(predicate: (T) -> Boolean): T? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun ByteArray.firstOrNull(predicate: (Byte) -> Boolean): Byte? +public expect inline fun ByteArray.firstOrNull(predicate: (Byte) -> Boolean): Byte? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun ShortArray.firstOrNull(predicate: (Short) -> Boolean): Short? +public expect inline fun ShortArray.firstOrNull(predicate: (Short) -> Boolean): Short? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun IntArray.firstOrNull(predicate: (Int) -> Boolean): Int? +public expect inline fun IntArray.firstOrNull(predicate: (Int) -> Boolean): Int? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun LongArray.firstOrNull(predicate: (Long) -> Boolean): Long? +public expect inline fun LongArray.firstOrNull(predicate: (Long) -> Boolean): Long? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun FloatArray.firstOrNull(predicate: (Float) -> Boolean): Float? +public expect inline fun FloatArray.firstOrNull(predicate: (Float) -> Boolean): Float? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun DoubleArray.firstOrNull(predicate: (Double) -> Boolean): Double? +public expect inline fun DoubleArray.firstOrNull(predicate: (Double) -> Boolean): Double? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun BooleanArray.firstOrNull(predicate: (Boolean) -> Boolean): Boolean? +public expect inline fun BooleanArray.firstOrNull(predicate: (Boolean) -> Boolean): Boolean? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun CharArray.firstOrNull(predicate: (Char) -> Boolean): Char? +public expect inline fun CharArray.firstOrNull(predicate: (Char) -> Boolean): Char? /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun Array.getOrElse(index: Int, defaultValue: (Int) -> T): T +public expect inline fun Array.getOrElse(index: Int, defaultValue: (Int) -> T): T /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.getOrElse(index: Int, defaultValue: (Int) -> Byte): Byte +public expect inline fun ByteArray.getOrElse(index: Int, defaultValue: (Int) -> Byte): Byte /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.getOrElse(index: Int, defaultValue: (Int) -> Short): Short +public expect inline fun ShortArray.getOrElse(index: Int, defaultValue: (Int) -> Short): Short /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.getOrElse(index: Int, defaultValue: (Int) -> Int): Int +public expect inline fun IntArray.getOrElse(index: Int, defaultValue: (Int) -> Int): Int /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.getOrElse(index: Int, defaultValue: (Int) -> Long): Long +public expect inline fun LongArray.getOrElse(index: Int, defaultValue: (Int) -> Long): Long /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.getOrElse(index: Int, defaultValue: (Int) -> Float): Float +public expect inline fun FloatArray.getOrElse(index: Int, defaultValue: (Int) -> Float): Float /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.getOrElse(index: Int, defaultValue: (Int) -> Double): Double +public expect inline fun DoubleArray.getOrElse(index: Int, defaultValue: (Int) -> Double): Double /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.getOrElse(index: Int, defaultValue: (Int) -> Boolean): Boolean +public expect inline fun BooleanArray.getOrElse(index: Int, defaultValue: (Int) -> Boolean): Boolean /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.getOrElse(index: Int, defaultValue: (Int) -> Char): Char +public expect inline fun CharArray.getOrElse(index: Int, defaultValue: (Int) -> Char): Char /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun Array.getOrNull(index: Int): T? +public expect fun Array.getOrNull(index: Int): T? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun ByteArray.getOrNull(index: Int): Byte? +public expect fun ByteArray.getOrNull(index: Int): Byte? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun ShortArray.getOrNull(index: Int): Short? +public expect fun ShortArray.getOrNull(index: Int): Short? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun IntArray.getOrNull(index: Int): Int? +public expect fun IntArray.getOrNull(index: Int): Int? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun LongArray.getOrNull(index: Int): Long? +public expect fun LongArray.getOrNull(index: Int): Long? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun FloatArray.getOrNull(index: Int): Float? +public expect fun FloatArray.getOrNull(index: Int): Float? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun DoubleArray.getOrNull(index: Int): Double? +public expect fun DoubleArray.getOrNull(index: Int): Double? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun BooleanArray.getOrNull(index: Int): Boolean? +public expect fun BooleanArray.getOrNull(index: Int): Boolean? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array. */ -public header fun CharArray.getOrNull(index: Int): Char? +public expect fun CharArray.getOrNull(index: Int): Char? /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun <@kotlin.internal.OnlyInputTypes T> Array.indexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> Array.indexOf(element: T): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun ByteArray.indexOf(element: Byte): Int +public expect fun ByteArray.indexOf(element: Byte): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun ShortArray.indexOf(element: Short): Int +public expect fun ShortArray.indexOf(element: Short): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun IntArray.indexOf(element: Int): Int +public expect fun IntArray.indexOf(element: Int): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun LongArray.indexOf(element: Long): Int +public expect fun LongArray.indexOf(element: Long): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun FloatArray.indexOf(element: Float): Int +public expect fun FloatArray.indexOf(element: Float): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun DoubleArray.indexOf(element: Double): Int +public expect fun DoubleArray.indexOf(element: Double): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun BooleanArray.indexOf(element: Boolean): Int +public expect fun BooleanArray.indexOf(element: Boolean): Int /** * Returns first index of [element], or -1 if the array does not contain element. */ -public header fun CharArray.indexOf(element: Char): Int +public expect fun CharArray.indexOf(element: Char): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun Array.indexOfFirst(predicate: (T) -> Boolean): Int +public expect inline fun Array.indexOfFirst(predicate: (T) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun ByteArray.indexOfFirst(predicate: (Byte) -> Boolean): Int +public expect inline fun ByteArray.indexOfFirst(predicate: (Byte) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun ShortArray.indexOfFirst(predicate: (Short) -> Boolean): Int +public expect inline fun ShortArray.indexOfFirst(predicate: (Short) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun IntArray.indexOfFirst(predicate: (Int) -> Boolean): Int +public expect inline fun IntArray.indexOfFirst(predicate: (Int) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun LongArray.indexOfFirst(predicate: (Long) -> Boolean): Int +public expect inline fun LongArray.indexOfFirst(predicate: (Long) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun FloatArray.indexOfFirst(predicate: (Float) -> Boolean): Int +public expect inline fun FloatArray.indexOfFirst(predicate: (Float) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun DoubleArray.indexOfFirst(predicate: (Double) -> Boolean): Int +public expect inline fun DoubleArray.indexOfFirst(predicate: (Double) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun BooleanArray.indexOfFirst(predicate: (Boolean) -> Boolean): Int +public expect inline fun BooleanArray.indexOfFirst(predicate: (Boolean) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun CharArray.indexOfFirst(predicate: (Char) -> Boolean): Int +public expect inline fun CharArray.indexOfFirst(predicate: (Char) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun Array.indexOfLast(predicate: (T) -> Boolean): Int +public expect inline fun Array.indexOfLast(predicate: (T) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun ByteArray.indexOfLast(predicate: (Byte) -> Boolean): Int +public expect inline fun ByteArray.indexOfLast(predicate: (Byte) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun ShortArray.indexOfLast(predicate: (Short) -> Boolean): Int +public expect inline fun ShortArray.indexOfLast(predicate: (Short) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun IntArray.indexOfLast(predicate: (Int) -> Boolean): Int +public expect inline fun IntArray.indexOfLast(predicate: (Int) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun LongArray.indexOfLast(predicate: (Long) -> Boolean): Int +public expect inline fun LongArray.indexOfLast(predicate: (Long) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun FloatArray.indexOfLast(predicate: (Float) -> Boolean): Int +public expect inline fun FloatArray.indexOfLast(predicate: (Float) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun DoubleArray.indexOfLast(predicate: (Double) -> Boolean): Int +public expect inline fun DoubleArray.indexOfLast(predicate: (Double) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun BooleanArray.indexOfLast(predicate: (Boolean) -> Boolean): Int +public expect inline fun BooleanArray.indexOfLast(predicate: (Boolean) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the array does not contain such element. */ -public header inline fun CharArray.indexOfLast(predicate: (Char) -> Boolean): Int +public expect inline fun CharArray.indexOfLast(predicate: (Char) -> Boolean): Int /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun Array.last(): T +public expect fun Array.last(): T /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun ByteArray.last(): Byte +public expect fun ByteArray.last(): Byte /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun ShortArray.last(): Short +public expect fun ShortArray.last(): Short /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun IntArray.last(): Int +public expect fun IntArray.last(): Int /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun LongArray.last(): Long +public expect fun LongArray.last(): Long /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun FloatArray.last(): Float +public expect fun FloatArray.last(): Float /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun DoubleArray.last(): Double +public expect fun DoubleArray.last(): Double /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun BooleanArray.last(): Boolean +public expect fun BooleanArray.last(): Boolean /** * Returns the last element. * @throws [NoSuchElementException] if the array is empty. */ -public header fun CharArray.last(): Char +public expect fun CharArray.last(): Char /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun Array.last(predicate: (T) -> Boolean): T +public expect inline fun Array.last(predicate: (T) -> Boolean): T /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun ByteArray.last(predicate: (Byte) -> Boolean): Byte +public expect inline fun ByteArray.last(predicate: (Byte) -> Boolean): Byte /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun ShortArray.last(predicate: (Short) -> Boolean): Short +public expect inline fun ShortArray.last(predicate: (Short) -> Boolean): Short /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun IntArray.last(predicate: (Int) -> Boolean): Int +public expect inline fun IntArray.last(predicate: (Int) -> Boolean): Int /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun LongArray.last(predicate: (Long) -> Boolean): Long +public expect inline fun LongArray.last(predicate: (Long) -> Boolean): Long /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun FloatArray.last(predicate: (Float) -> Boolean): Float +public expect inline fun FloatArray.last(predicate: (Float) -> Boolean): Float /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun DoubleArray.last(predicate: (Double) -> Boolean): Double +public expect inline fun DoubleArray.last(predicate: (Double) -> Boolean): Double /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun BooleanArray.last(predicate: (Boolean) -> Boolean): Boolean +public expect inline fun BooleanArray.last(predicate: (Boolean) -> Boolean): Boolean /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun CharArray.last(predicate: (Char) -> Boolean): Char +public expect inline fun CharArray.last(predicate: (Char) -> Boolean): Char /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun <@kotlin.internal.OnlyInputTypes T> Array.lastIndexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> Array.lastIndexOf(element: T): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun ByteArray.lastIndexOf(element: Byte): Int +public expect fun ByteArray.lastIndexOf(element: Byte): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun ShortArray.lastIndexOf(element: Short): Int +public expect fun ShortArray.lastIndexOf(element: Short): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun IntArray.lastIndexOf(element: Int): Int +public expect fun IntArray.lastIndexOf(element: Int): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun LongArray.lastIndexOf(element: Long): Int +public expect fun LongArray.lastIndexOf(element: Long): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun FloatArray.lastIndexOf(element: Float): Int +public expect fun FloatArray.lastIndexOf(element: Float): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun DoubleArray.lastIndexOf(element: Double): Int +public expect fun DoubleArray.lastIndexOf(element: Double): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun BooleanArray.lastIndexOf(element: Boolean): Int +public expect fun BooleanArray.lastIndexOf(element: Boolean): Int /** * Returns last index of [element], or -1 if the array does not contain element. */ -public header fun CharArray.lastIndexOf(element: Char): Int +public expect fun CharArray.lastIndexOf(element: Char): Int /** * Returns the last element, or `null` if the array is empty. */ -public header fun Array.lastOrNull(): T? +public expect fun Array.lastOrNull(): T? /** * Returns the last element, or `null` if the array is empty. */ -public header fun ByteArray.lastOrNull(): Byte? +public expect fun ByteArray.lastOrNull(): Byte? /** * Returns the last element, or `null` if the array is empty. */ -public header fun ShortArray.lastOrNull(): Short? +public expect fun ShortArray.lastOrNull(): Short? /** * Returns the last element, or `null` if the array is empty. */ -public header fun IntArray.lastOrNull(): Int? +public expect fun IntArray.lastOrNull(): Int? /** * Returns the last element, or `null` if the array is empty. */ -public header fun LongArray.lastOrNull(): Long? +public expect fun LongArray.lastOrNull(): Long? /** * Returns the last element, or `null` if the array is empty. */ -public header fun FloatArray.lastOrNull(): Float? +public expect fun FloatArray.lastOrNull(): Float? /** * Returns the last element, or `null` if the array is empty. */ -public header fun DoubleArray.lastOrNull(): Double? +public expect fun DoubleArray.lastOrNull(): Double? /** * Returns the last element, or `null` if the array is empty. */ -public header fun BooleanArray.lastOrNull(): Boolean? +public expect fun BooleanArray.lastOrNull(): Boolean? /** * Returns the last element, or `null` if the array is empty. */ -public header fun CharArray.lastOrNull(): Char? +public expect fun CharArray.lastOrNull(): Char? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun Array.lastOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Array.lastOrNull(predicate: (T) -> Boolean): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun ByteArray.lastOrNull(predicate: (Byte) -> Boolean): Byte? +public expect inline fun ByteArray.lastOrNull(predicate: (Byte) -> Boolean): Byte? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun ShortArray.lastOrNull(predicate: (Short) -> Boolean): Short? +public expect inline fun ShortArray.lastOrNull(predicate: (Short) -> Boolean): Short? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun IntArray.lastOrNull(predicate: (Int) -> Boolean): Int? +public expect inline fun IntArray.lastOrNull(predicate: (Int) -> Boolean): Int? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun LongArray.lastOrNull(predicate: (Long) -> Boolean): Long? +public expect inline fun LongArray.lastOrNull(predicate: (Long) -> Boolean): Long? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun FloatArray.lastOrNull(predicate: (Float) -> Boolean): Float? +public expect inline fun FloatArray.lastOrNull(predicate: (Float) -> Boolean): Float? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun DoubleArray.lastOrNull(predicate: (Double) -> Boolean): Double? +public expect inline fun DoubleArray.lastOrNull(predicate: (Double) -> Boolean): Double? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun BooleanArray.lastOrNull(predicate: (Boolean) -> Boolean): Boolean? +public expect inline fun BooleanArray.lastOrNull(predicate: (Boolean) -> Boolean): Boolean? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun CharArray.lastOrNull(predicate: (Char) -> Boolean): Char? +public expect inline fun CharArray.lastOrNull(predicate: (Char) -> Boolean): Char? /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun Array.single(): T +public expect fun Array.single(): T /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun ByteArray.single(): Byte +public expect fun ByteArray.single(): Byte /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun ShortArray.single(): Short +public expect fun ShortArray.single(): Short /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun IntArray.single(): Int +public expect fun IntArray.single(): Int /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun LongArray.single(): Long +public expect fun LongArray.single(): Long /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun FloatArray.single(): Float +public expect fun FloatArray.single(): Float /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun DoubleArray.single(): Double +public expect fun DoubleArray.single(): Double /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun BooleanArray.single(): Boolean +public expect fun BooleanArray.single(): Boolean /** * Returns the single element, or throws an exception if the array is empty or has more than one element. */ -public header fun CharArray.single(): Char +public expect fun CharArray.single(): Char /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun Array.single(predicate: (T) -> Boolean): T +public expect inline fun Array.single(predicate: (T) -> Boolean): T /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun ByteArray.single(predicate: (Byte) -> Boolean): Byte +public expect inline fun ByteArray.single(predicate: (Byte) -> Boolean): Byte /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun ShortArray.single(predicate: (Short) -> Boolean): Short +public expect inline fun ShortArray.single(predicate: (Short) -> Boolean): Short /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun IntArray.single(predicate: (Int) -> Boolean): Int +public expect inline fun IntArray.single(predicate: (Int) -> Boolean): Int /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun LongArray.single(predicate: (Long) -> Boolean): Long +public expect inline fun LongArray.single(predicate: (Long) -> Boolean): Long /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun FloatArray.single(predicate: (Float) -> Boolean): Float +public expect inline fun FloatArray.single(predicate: (Float) -> Boolean): Float /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun DoubleArray.single(predicate: (Double) -> Boolean): Double +public expect inline fun DoubleArray.single(predicate: (Double) -> Boolean): Double /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun BooleanArray.single(predicate: (Boolean) -> Boolean): Boolean +public expect inline fun BooleanArray.single(predicate: (Boolean) -> Boolean): Boolean /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun CharArray.single(predicate: (Char) -> Boolean): Char +public expect inline fun CharArray.single(predicate: (Char) -> Boolean): Char /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun Array.singleOrNull(): T? +public expect fun Array.singleOrNull(): T? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun ByteArray.singleOrNull(): Byte? +public expect fun ByteArray.singleOrNull(): Byte? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun ShortArray.singleOrNull(): Short? +public expect fun ShortArray.singleOrNull(): Short? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun IntArray.singleOrNull(): Int? +public expect fun IntArray.singleOrNull(): Int? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun LongArray.singleOrNull(): Long? +public expect fun LongArray.singleOrNull(): Long? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun FloatArray.singleOrNull(): Float? +public expect fun FloatArray.singleOrNull(): Float? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun DoubleArray.singleOrNull(): Double? +public expect fun DoubleArray.singleOrNull(): Double? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun BooleanArray.singleOrNull(): Boolean? +public expect fun BooleanArray.singleOrNull(): Boolean? /** * Returns single element, or `null` if the array is empty or has more than one element. */ -public header fun CharArray.singleOrNull(): Char? +public expect fun CharArray.singleOrNull(): Char? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun Array.singleOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Array.singleOrNull(predicate: (T) -> Boolean): T? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun ByteArray.singleOrNull(predicate: (Byte) -> Boolean): Byte? +public expect inline fun ByteArray.singleOrNull(predicate: (Byte) -> Boolean): Byte? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun ShortArray.singleOrNull(predicate: (Short) -> Boolean): Short? +public expect inline fun ShortArray.singleOrNull(predicate: (Short) -> Boolean): Short? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun IntArray.singleOrNull(predicate: (Int) -> Boolean): Int? +public expect inline fun IntArray.singleOrNull(predicate: (Int) -> Boolean): Int? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun LongArray.singleOrNull(predicate: (Long) -> Boolean): Long? +public expect inline fun LongArray.singleOrNull(predicate: (Long) -> Boolean): Long? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun FloatArray.singleOrNull(predicate: (Float) -> Boolean): Float? +public expect inline fun FloatArray.singleOrNull(predicate: (Float) -> Boolean): Float? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun DoubleArray.singleOrNull(predicate: (Double) -> Boolean): Double? +public expect inline fun DoubleArray.singleOrNull(predicate: (Double) -> Boolean): Double? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun BooleanArray.singleOrNull(predicate: (Boolean) -> Boolean): Boolean? +public expect inline fun BooleanArray.singleOrNull(predicate: (Boolean) -> Boolean): Boolean? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun CharArray.singleOrNull(predicate: (Char) -> Boolean): Char? +public expect inline fun CharArray.singleOrNull(predicate: (Char) -> Boolean): Char? /** * Returns a list containing all elements except first [n] elements. */ -public header fun Array.drop(n: Int): List +public expect fun Array.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun ByteArray.drop(n: Int): List +public expect fun ByteArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun ShortArray.drop(n: Int): List +public expect fun ShortArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun IntArray.drop(n: Int): List +public expect fun IntArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun LongArray.drop(n: Int): List +public expect fun LongArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun FloatArray.drop(n: Int): List +public expect fun FloatArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun DoubleArray.drop(n: Int): List +public expect fun DoubleArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun BooleanArray.drop(n: Int): List +public expect fun BooleanArray.drop(n: Int): List /** * Returns a list containing all elements except first [n] elements. */ -public header fun CharArray.drop(n: Int): List +public expect fun CharArray.drop(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun Array.dropLast(n: Int): List +public expect fun Array.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun ByteArray.dropLast(n: Int): List +public expect fun ByteArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun ShortArray.dropLast(n: Int): List +public expect fun ShortArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun IntArray.dropLast(n: Int): List +public expect fun IntArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun LongArray.dropLast(n: Int): List +public expect fun LongArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun FloatArray.dropLast(n: Int): List +public expect fun FloatArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun DoubleArray.dropLast(n: Int): List +public expect fun DoubleArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun BooleanArray.dropLast(n: Int): List +public expect fun BooleanArray.dropLast(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun CharArray.dropLast(n: Int): List +public expect fun CharArray.dropLast(n: Int): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun Array.dropLastWhile(predicate: (T) -> Boolean): List +public expect inline fun Array.dropLastWhile(predicate: (T) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun ByteArray.dropLastWhile(predicate: (Byte) -> Boolean): List +public expect inline fun ByteArray.dropLastWhile(predicate: (Byte) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun ShortArray.dropLastWhile(predicate: (Short) -> Boolean): List +public expect inline fun ShortArray.dropLastWhile(predicate: (Short) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun IntArray.dropLastWhile(predicate: (Int) -> Boolean): List +public expect inline fun IntArray.dropLastWhile(predicate: (Int) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun LongArray.dropLastWhile(predicate: (Long) -> Boolean): List +public expect inline fun LongArray.dropLastWhile(predicate: (Long) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun FloatArray.dropLastWhile(predicate: (Float) -> Boolean): List +public expect inline fun FloatArray.dropLastWhile(predicate: (Float) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun DoubleArray.dropLastWhile(predicate: (Double) -> Boolean): List +public expect inline fun DoubleArray.dropLastWhile(predicate: (Double) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun BooleanArray.dropLastWhile(predicate: (Boolean) -> Boolean): List +public expect inline fun BooleanArray.dropLastWhile(predicate: (Boolean) -> Boolean): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun CharArray.dropLastWhile(predicate: (Char) -> Boolean): List +public expect inline fun CharArray.dropLastWhile(predicate: (Char) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun Array.dropWhile(predicate: (T) -> Boolean): List +public expect inline fun Array.dropWhile(predicate: (T) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun ByteArray.dropWhile(predicate: (Byte) -> Boolean): List +public expect inline fun ByteArray.dropWhile(predicate: (Byte) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun ShortArray.dropWhile(predicate: (Short) -> Boolean): List +public expect inline fun ShortArray.dropWhile(predicate: (Short) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun IntArray.dropWhile(predicate: (Int) -> Boolean): List +public expect inline fun IntArray.dropWhile(predicate: (Int) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun LongArray.dropWhile(predicate: (Long) -> Boolean): List +public expect inline fun LongArray.dropWhile(predicate: (Long) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun FloatArray.dropWhile(predicate: (Float) -> Boolean): List +public expect inline fun FloatArray.dropWhile(predicate: (Float) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun DoubleArray.dropWhile(predicate: (Double) -> Boolean): List +public expect inline fun DoubleArray.dropWhile(predicate: (Double) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun BooleanArray.dropWhile(predicate: (Boolean) -> Boolean): List +public expect inline fun BooleanArray.dropWhile(predicate: (Boolean) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun CharArray.dropWhile(predicate: (Char) -> Boolean): List +public expect inline fun CharArray.dropWhile(predicate: (Char) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun Array.filter(predicate: (T) -> Boolean): List +public expect inline fun Array.filter(predicate: (T) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun ByteArray.filter(predicate: (Byte) -> Boolean): List +public expect inline fun ByteArray.filter(predicate: (Byte) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun ShortArray.filter(predicate: (Short) -> Boolean): List +public expect inline fun ShortArray.filter(predicate: (Short) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun IntArray.filter(predicate: (Int) -> Boolean): List +public expect inline fun IntArray.filter(predicate: (Int) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun LongArray.filter(predicate: (Long) -> Boolean): List +public expect inline fun LongArray.filter(predicate: (Long) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun FloatArray.filter(predicate: (Float) -> Boolean): List +public expect inline fun FloatArray.filter(predicate: (Float) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun DoubleArray.filter(predicate: (Double) -> Boolean): List +public expect inline fun DoubleArray.filter(predicate: (Double) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun BooleanArray.filter(predicate: (Boolean) -> Boolean): List +public expect inline fun BooleanArray.filter(predicate: (Boolean) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun CharArray.filter(predicate: (Char) -> Boolean): List +public expect inline fun CharArray.filter(predicate: (Char) -> 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 Array.filterIndexed(predicate: (index: Int, T) -> Boolean): List +public expect 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: (index: Int, Byte) -> Boolean): List +public expect 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: (index: Int, Short) -> Boolean): List +public expect 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: (index: Int, Int) -> Boolean): List +public expect 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: (index: Int, Long) -> Boolean): List +public expect 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: (index: Int, Float) -> Boolean): List +public expect 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: (index: Int, Double) -> Boolean): List +public expect 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: (index: Int, Boolean) -> Boolean): List +public expect 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: (index: Int, Char) -> Boolean): List +public expect 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: (index: Int, T) -> Boolean): C +public expect 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: (index: Int, Byte) -> Boolean): C +public expect 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: (index: Int, Short) -> Boolean): C +public expect 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: (index: Int, Int) -> Boolean): C +public expect 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: (index: Int, Long) -> Boolean): C +public expect 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: (index: Int, Float) -> Boolean): C +public expect 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: (index: Int, Double) -> Boolean): C +public expect 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: (index: Int, Boolean) -> Boolean): C +public expect 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: (index: Int, Char) -> Boolean): C +public expect 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. */ -public header inline fun Array<*>.filterIsInstance(): List<@kotlin.internal.NoInfer R> +public expect inline fun Array<*>.filterIsInstance(): List<@kotlin.internal.NoInfer R> /** * Appends all elements that are instances of specified type parameter R to the given [destination]. */ -public header inline fun > Array<*>.filterIsInstanceTo(destination: C): C +public expect inline fun > Array<*>.filterIsInstanceTo(destination: C): C /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun Array.filterNot(predicate: (T) -> Boolean): List +public expect inline fun Array.filterNot(predicate: (T) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun ByteArray.filterNot(predicate: (Byte) -> Boolean): List +public expect inline fun ByteArray.filterNot(predicate: (Byte) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun ShortArray.filterNot(predicate: (Short) -> Boolean): List +public expect inline fun ShortArray.filterNot(predicate: (Short) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun IntArray.filterNot(predicate: (Int) -> Boolean): List +public expect inline fun IntArray.filterNot(predicate: (Int) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun LongArray.filterNot(predicate: (Long) -> Boolean): List +public expect inline fun LongArray.filterNot(predicate: (Long) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun FloatArray.filterNot(predicate: (Float) -> Boolean): List +public expect inline fun FloatArray.filterNot(predicate: (Float) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun DoubleArray.filterNot(predicate: (Double) -> Boolean): List +public expect inline fun DoubleArray.filterNot(predicate: (Double) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun BooleanArray.filterNot(predicate: (Boolean) -> Boolean): List +public expect inline fun BooleanArray.filterNot(predicate: (Boolean) -> Boolean): List /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun CharArray.filterNot(predicate: (Char) -> Boolean): List +public expect inline fun CharArray.filterNot(predicate: (Char) -> Boolean): List /** * Returns a list containing all elements that are not `null`. */ -public header fun Array.filterNotNull(): List +public expect fun Array.filterNotNull(): List /** * Appends all elements that are not `null` to the given [destination]. */ -public header fun , T : Any> Array.filterNotNullTo(destination: C): C +public expect fun , T : Any> Array.filterNotNullTo(destination: C): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > Array.filterNotTo(destination: C, predicate: (T) -> Boolean): C +public expect inline fun > Array.filterNotTo(destination: C, predicate: (T) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > ByteArray.filterNotTo(destination: C, predicate: (Byte) -> Boolean): C +public expect inline fun > ByteArray.filterNotTo(destination: C, predicate: (Byte) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > ShortArray.filterNotTo(destination: C, predicate: (Short) -> Boolean): C +public expect inline fun > ShortArray.filterNotTo(destination: C, predicate: (Short) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > IntArray.filterNotTo(destination: C, predicate: (Int) -> Boolean): C +public expect inline fun > IntArray.filterNotTo(destination: C, predicate: (Int) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > LongArray.filterNotTo(destination: C, predicate: (Long) -> Boolean): C +public expect inline fun > LongArray.filterNotTo(destination: C, predicate: (Long) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > FloatArray.filterNotTo(destination: C, predicate: (Float) -> Boolean): C +public expect inline fun > FloatArray.filterNotTo(destination: C, predicate: (Float) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > DoubleArray.filterNotTo(destination: C, predicate: (Double) -> Boolean): C +public expect inline fun > DoubleArray.filterNotTo(destination: C, predicate: (Double) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > BooleanArray.filterNotTo(destination: C, predicate: (Boolean) -> Boolean): C +public expect inline fun > BooleanArray.filterNotTo(destination: C, predicate: (Boolean) -> Boolean): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > CharArray.filterNotTo(destination: C, predicate: (Char) -> Boolean): C +public expect inline fun > CharArray.filterNotTo(destination: C, predicate: (Char) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > Array.filterTo(destination: C, predicate: (T) -> Boolean): C +public expect inline fun > Array.filterTo(destination: C, predicate: (T) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > ByteArray.filterTo(destination: C, predicate: (Byte) -> Boolean): C +public expect inline fun > ByteArray.filterTo(destination: C, predicate: (Byte) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > ShortArray.filterTo(destination: C, predicate: (Short) -> Boolean): C +public expect inline fun > ShortArray.filterTo(destination: C, predicate: (Short) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > IntArray.filterTo(destination: C, predicate: (Int) -> Boolean): C +public expect inline fun > IntArray.filterTo(destination: C, predicate: (Int) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > LongArray.filterTo(destination: C, predicate: (Long) -> Boolean): C +public expect inline fun > LongArray.filterTo(destination: C, predicate: (Long) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > FloatArray.filterTo(destination: C, predicate: (Float) -> Boolean): C +public expect inline fun > FloatArray.filterTo(destination: C, predicate: (Float) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > DoubleArray.filterTo(destination: C, predicate: (Double) -> Boolean): C +public expect inline fun > DoubleArray.filterTo(destination: C, predicate: (Double) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > BooleanArray.filterTo(destination: C, predicate: (Boolean) -> Boolean): C +public expect inline fun > BooleanArray.filterTo(destination: C, predicate: (Boolean) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > CharArray.filterTo(destination: C, predicate: (Char) -> Boolean): C +public expect inline fun > CharArray.filterTo(destination: C, predicate: (Char) -> Boolean): C /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun Array.slice(indices: IntRange): List +public expect fun Array.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun ByteArray.slice(indices: IntRange): List +public expect fun ByteArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun ShortArray.slice(indices: IntRange): List +public expect fun ShortArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun IntArray.slice(indices: IntRange): List +public expect fun IntArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun LongArray.slice(indices: IntRange): List +public expect fun LongArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun FloatArray.slice(indices: IntRange): List +public expect fun FloatArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun DoubleArray.slice(indices: IntRange): List +public expect fun DoubleArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun BooleanArray.slice(indices: IntRange): List +public expect fun BooleanArray.slice(indices: IntRange): List /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun CharArray.slice(indices: IntRange): List +public expect fun CharArray.slice(indices: IntRange): List /** * Returns a list containing elements at specified [indices]. */ -public header fun Array.slice(indices: Iterable): List +public expect fun Array.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun ByteArray.slice(indices: Iterable): List +public expect fun ByteArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun ShortArray.slice(indices: Iterable): List +public expect fun ShortArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun IntArray.slice(indices: Iterable): List +public expect fun IntArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun LongArray.slice(indices: Iterable): List +public expect fun LongArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun FloatArray.slice(indices: Iterable): List +public expect fun FloatArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun DoubleArray.slice(indices: Iterable): List +public expect fun DoubleArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun BooleanArray.slice(indices: Iterable): List +public expect fun BooleanArray.slice(indices: Iterable): List /** * Returns a list containing elements at specified [indices]. */ -public header fun CharArray.slice(indices: Iterable): List +public expect fun CharArray.slice(indices: Iterable): List /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun Array.sliceArray(indices: Collection): Array +public expect fun Array.sliceArray(indices: Collection): Array /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun ByteArray.sliceArray(indices: Collection): ByteArray +public expect fun ByteArray.sliceArray(indices: Collection): ByteArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun ShortArray.sliceArray(indices: Collection): ShortArray +public expect fun ShortArray.sliceArray(indices: Collection): ShortArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun IntArray.sliceArray(indices: Collection): IntArray +public expect fun IntArray.sliceArray(indices: Collection): IntArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun LongArray.sliceArray(indices: Collection): LongArray +public expect fun LongArray.sliceArray(indices: Collection): LongArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun FloatArray.sliceArray(indices: Collection): FloatArray +public expect fun FloatArray.sliceArray(indices: Collection): FloatArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun DoubleArray.sliceArray(indices: Collection): DoubleArray +public expect fun DoubleArray.sliceArray(indices: Collection): DoubleArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun BooleanArray.sliceArray(indices: Collection): BooleanArray +public expect fun BooleanArray.sliceArray(indices: Collection): BooleanArray /** * Returns an array containing elements of this array at specified [indices]. */ -public header fun CharArray.sliceArray(indices: Collection): CharArray +public expect fun CharArray.sliceArray(indices: Collection): CharArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun Array.sliceArray(indices: IntRange): Array +public expect fun Array.sliceArray(indices: IntRange): Array /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun ByteArray.sliceArray(indices: IntRange): ByteArray +public expect fun ByteArray.sliceArray(indices: IntRange): ByteArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun ShortArray.sliceArray(indices: IntRange): ShortArray +public expect fun ShortArray.sliceArray(indices: IntRange): ShortArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun IntArray.sliceArray(indices: IntRange): IntArray +public expect fun IntArray.sliceArray(indices: IntRange): IntArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun LongArray.sliceArray(indices: IntRange): LongArray +public expect fun LongArray.sliceArray(indices: IntRange): LongArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun FloatArray.sliceArray(indices: IntRange): FloatArray +public expect fun FloatArray.sliceArray(indices: IntRange): FloatArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun DoubleArray.sliceArray(indices: IntRange): DoubleArray +public expect fun DoubleArray.sliceArray(indices: IntRange): DoubleArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun BooleanArray.sliceArray(indices: IntRange): BooleanArray +public expect fun BooleanArray.sliceArray(indices: IntRange): BooleanArray /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun CharArray.sliceArray(indices: IntRange): CharArray +public expect fun CharArray.sliceArray(indices: IntRange): CharArray /** * Returns a list containing first [n] elements. */ -public header fun Array.take(n: Int): List +public expect fun Array.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun ByteArray.take(n: Int): List +public expect fun ByteArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun ShortArray.take(n: Int): List +public expect fun ShortArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun IntArray.take(n: Int): List +public expect fun IntArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun LongArray.take(n: Int): List +public expect fun LongArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun FloatArray.take(n: Int): List +public expect fun FloatArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun DoubleArray.take(n: Int): List +public expect fun DoubleArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun BooleanArray.take(n: Int): List +public expect fun BooleanArray.take(n: Int): List /** * Returns a list containing first [n] elements. */ -public header fun CharArray.take(n: Int): List +public expect fun CharArray.take(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun Array.takeLast(n: Int): List +public expect fun Array.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun ByteArray.takeLast(n: Int): List +public expect fun ByteArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun ShortArray.takeLast(n: Int): List +public expect fun ShortArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun IntArray.takeLast(n: Int): List +public expect fun IntArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun LongArray.takeLast(n: Int): List +public expect fun LongArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun FloatArray.takeLast(n: Int): List +public expect fun FloatArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun DoubleArray.takeLast(n: Int): List +public expect fun DoubleArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun BooleanArray.takeLast(n: Int): List +public expect fun BooleanArray.takeLast(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun CharArray.takeLast(n: Int): List +public expect fun CharArray.takeLast(n: Int): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun Array.takeLastWhile(predicate: (T) -> Boolean): List +public expect inline fun Array.takeLastWhile(predicate: (T) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun ByteArray.takeLastWhile(predicate: (Byte) -> Boolean): List +public expect inline fun ByteArray.takeLastWhile(predicate: (Byte) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun ShortArray.takeLastWhile(predicate: (Short) -> Boolean): List +public expect inline fun ShortArray.takeLastWhile(predicate: (Short) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun IntArray.takeLastWhile(predicate: (Int) -> Boolean): List +public expect inline fun IntArray.takeLastWhile(predicate: (Int) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun LongArray.takeLastWhile(predicate: (Long) -> Boolean): List +public expect inline fun LongArray.takeLastWhile(predicate: (Long) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun FloatArray.takeLastWhile(predicate: (Float) -> Boolean): List +public expect inline fun FloatArray.takeLastWhile(predicate: (Float) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun DoubleArray.takeLastWhile(predicate: (Double) -> Boolean): List +public expect inline fun DoubleArray.takeLastWhile(predicate: (Double) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun BooleanArray.takeLastWhile(predicate: (Boolean) -> Boolean): List +public expect inline fun BooleanArray.takeLastWhile(predicate: (Boolean) -> Boolean): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun CharArray.takeLastWhile(predicate: (Char) -> Boolean): List +public expect inline fun CharArray.takeLastWhile(predicate: (Char) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun Array.takeWhile(predicate: (T) -> Boolean): List +public expect inline fun Array.takeWhile(predicate: (T) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun ByteArray.takeWhile(predicate: (Byte) -> Boolean): List +public expect inline fun ByteArray.takeWhile(predicate: (Byte) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun ShortArray.takeWhile(predicate: (Short) -> Boolean): List +public expect inline fun ShortArray.takeWhile(predicate: (Short) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun IntArray.takeWhile(predicate: (Int) -> Boolean): List +public expect inline fun IntArray.takeWhile(predicate: (Int) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun LongArray.takeWhile(predicate: (Long) -> Boolean): List +public expect inline fun LongArray.takeWhile(predicate: (Long) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun FloatArray.takeWhile(predicate: (Float) -> Boolean): List +public expect inline fun FloatArray.takeWhile(predicate: (Float) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun DoubleArray.takeWhile(predicate: (Double) -> Boolean): List +public expect inline fun DoubleArray.takeWhile(predicate: (Double) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun BooleanArray.takeWhile(predicate: (Boolean) -> Boolean): List +public expect inline fun BooleanArray.takeWhile(predicate: (Boolean) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun CharArray.takeWhile(predicate: (Char) -> Boolean): List +public expect inline fun CharArray.takeWhile(predicate: (Char) -> Boolean): List /** * Reverses elements in the array in-place. */ -public header fun Array.reverse(): Unit +public expect fun Array.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun ByteArray.reverse(): Unit +public expect fun ByteArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun ShortArray.reverse(): Unit +public expect fun ShortArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun IntArray.reverse(): Unit +public expect fun IntArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun LongArray.reverse(): Unit +public expect fun LongArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun FloatArray.reverse(): Unit +public expect fun FloatArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun DoubleArray.reverse(): Unit +public expect fun DoubleArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun BooleanArray.reverse(): Unit +public expect fun BooleanArray.reverse(): Unit /** * Reverses elements in the array in-place. */ -public header fun CharArray.reverse(): Unit +public expect fun CharArray.reverse(): Unit /** * Returns a list with elements in reversed order. */ -public header fun Array.reversed(): List +public expect fun Array.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun ByteArray.reversed(): List +public expect fun ByteArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun ShortArray.reversed(): List +public expect fun ShortArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun IntArray.reversed(): List +public expect fun IntArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun LongArray.reversed(): List +public expect fun LongArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun FloatArray.reversed(): List +public expect fun FloatArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun DoubleArray.reversed(): List +public expect fun DoubleArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun BooleanArray.reversed(): List +public expect fun BooleanArray.reversed(): List /** * Returns a list with elements in reversed order. */ -public header fun CharArray.reversed(): List +public expect fun CharArray.reversed(): List /** * Returns an array with elements of this array in reversed order. */ -public header fun Array.reversedArray(): Array +public expect fun Array.reversedArray(): Array /** * Returns an array with elements of this array in reversed order. */ -public header fun ByteArray.reversedArray(): ByteArray +public expect fun ByteArray.reversedArray(): ByteArray /** * Returns an array with elements of this array in reversed order. */ -public header fun ShortArray.reversedArray(): ShortArray +public expect fun ShortArray.reversedArray(): ShortArray /** * Returns an array with elements of this array in reversed order. */ -public header fun IntArray.reversedArray(): IntArray +public expect fun IntArray.reversedArray(): IntArray /** * Returns an array with elements of this array in reversed order. */ -public header fun LongArray.reversedArray(): LongArray +public expect fun LongArray.reversedArray(): LongArray /** * Returns an array with elements of this array in reversed order. */ -public header fun FloatArray.reversedArray(): FloatArray +public expect fun FloatArray.reversedArray(): FloatArray /** * Returns an array with elements of this array in reversed order. */ -public header fun DoubleArray.reversedArray(): DoubleArray +public expect fun DoubleArray.reversedArray(): DoubleArray /** * Returns an array with elements of this array in reversed order. */ -public header fun BooleanArray.reversedArray(): BooleanArray +public expect fun BooleanArray.reversedArray(): BooleanArray /** * Returns an array with elements of this array in reversed order. */ -public header fun CharArray.reversedArray(): CharArray +public expect fun CharArray.reversedArray(): CharArray /** * Sorts elements in the array in-place according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > Array.sortBy(crossinline selector: (T) -> R?): Unit +public expect inline fun > Array.sortBy(crossinline selector: (T) -> R?): Unit /** * Sorts elements in the array in-place descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > Array.sortByDescending(crossinline selector: (T) -> R?): Unit +public expect inline fun > Array.sortByDescending(crossinline selector: (T) -> R?): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun > Array.sortDescending(): Unit +public expect fun > Array.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun ByteArray.sortDescending(): Unit +public expect fun ByteArray.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun ShortArray.sortDescending(): Unit +public expect fun ShortArray.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun IntArray.sortDescending(): Unit +public expect fun IntArray.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun LongArray.sortDescending(): Unit +public expect fun LongArray.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun FloatArray.sortDescending(): Unit +public expect fun FloatArray.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun DoubleArray.sortDescending(): Unit +public expect fun DoubleArray.sortDescending(): Unit /** * Sorts elements in the array in-place descending according to their natural sort order. */ -public header fun CharArray.sortDescending(): Unit +public expect fun CharArray.sortDescending(): Unit /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun > Array.sorted(): List +public expect fun > Array.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun ByteArray.sorted(): List +public expect fun ByteArray.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun ShortArray.sorted(): List +public expect fun ShortArray.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun IntArray.sorted(): List +public expect fun IntArray.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun LongArray.sorted(): List +public expect fun LongArray.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun FloatArray.sorted(): List +public expect fun FloatArray.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun DoubleArray.sorted(): List +public expect fun DoubleArray.sorted(): List /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun CharArray.sorted(): List +public expect fun CharArray.sorted(): List /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun > Array.sortedArray(): Array +public expect fun > Array.sortedArray(): Array /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun ByteArray.sortedArray(): ByteArray +public expect fun ByteArray.sortedArray(): ByteArray /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun ShortArray.sortedArray(): ShortArray +public expect fun ShortArray.sortedArray(): ShortArray /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun IntArray.sortedArray(): IntArray +public expect fun IntArray.sortedArray(): IntArray /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun LongArray.sortedArray(): LongArray +public expect fun LongArray.sortedArray(): LongArray /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun FloatArray.sortedArray(): FloatArray +public expect fun FloatArray.sortedArray(): FloatArray /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun DoubleArray.sortedArray(): DoubleArray +public expect fun DoubleArray.sortedArray(): DoubleArray /** * Returns an array with all elements of this array sorted according to their natural sort order. */ -public header fun CharArray.sortedArray(): CharArray +public expect fun CharArray.sortedArray(): CharArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun > Array.sortedArrayDescending(): Array +public expect fun > Array.sortedArrayDescending(): Array /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun ByteArray.sortedArrayDescending(): ByteArray +public expect fun ByteArray.sortedArrayDescending(): ByteArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun ShortArray.sortedArrayDescending(): ShortArray +public expect fun ShortArray.sortedArrayDescending(): ShortArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun IntArray.sortedArrayDescending(): IntArray +public expect fun IntArray.sortedArrayDescending(): IntArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun LongArray.sortedArrayDescending(): LongArray +public expect fun LongArray.sortedArrayDescending(): LongArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun FloatArray.sortedArrayDescending(): FloatArray +public expect fun FloatArray.sortedArrayDescending(): FloatArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun DoubleArray.sortedArrayDescending(): DoubleArray +public expect fun DoubleArray.sortedArrayDescending(): DoubleArray /** * Returns an array with all elements of this array sorted descending according to their natural sort order. */ -public header fun CharArray.sortedArrayDescending(): CharArray +public expect fun CharArray.sortedArrayDescending(): CharArray /** * Returns an array with all elements of this array sorted according the specified [comparator]. */ -public header fun Array.sortedArrayWith(comparator: Comparator): Array +public expect fun Array.sortedArrayWith(comparator: Comparator): Array /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > Array.sortedBy(crossinline selector: (T) -> R?): List +public expect inline fun > Array.sortedBy(crossinline selector: (T) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > ByteArray.sortedBy(crossinline selector: (Byte) -> R?): List +public expect inline fun > ByteArray.sortedBy(crossinline selector: (Byte) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > ShortArray.sortedBy(crossinline selector: (Short) -> R?): List +public expect inline fun > ShortArray.sortedBy(crossinline selector: (Short) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > IntArray.sortedBy(crossinline selector: (Int) -> R?): List +public expect inline fun > IntArray.sortedBy(crossinline selector: (Int) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > LongArray.sortedBy(crossinline selector: (Long) -> R?): List +public expect inline fun > LongArray.sortedBy(crossinline selector: (Long) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > FloatArray.sortedBy(crossinline selector: (Float) -> R?): List +public expect inline fun > FloatArray.sortedBy(crossinline selector: (Float) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > DoubleArray.sortedBy(crossinline selector: (Double) -> R?): List +public expect inline fun > DoubleArray.sortedBy(crossinline selector: (Double) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > BooleanArray.sortedBy(crossinline selector: (Boolean) -> R?): List +public expect inline fun > BooleanArray.sortedBy(crossinline selector: (Boolean) -> R?): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > CharArray.sortedBy(crossinline selector: (Char) -> R?): List +public expect inline fun > CharArray.sortedBy(crossinline selector: (Char) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > Array.sortedByDescending(crossinline selector: (T) -> R?): List +public expect inline fun > Array.sortedByDescending(crossinline selector: (T) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > ByteArray.sortedByDescending(crossinline selector: (Byte) -> R?): List +public expect inline fun > ByteArray.sortedByDescending(crossinline selector: (Byte) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > ShortArray.sortedByDescending(crossinline selector: (Short) -> R?): List +public expect inline fun > ShortArray.sortedByDescending(crossinline selector: (Short) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > IntArray.sortedByDescending(crossinline selector: (Int) -> R?): List +public expect inline fun > IntArray.sortedByDescending(crossinline selector: (Int) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > LongArray.sortedByDescending(crossinline selector: (Long) -> R?): List +public expect inline fun > LongArray.sortedByDescending(crossinline selector: (Long) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > FloatArray.sortedByDescending(crossinline selector: (Float) -> R?): List +public expect inline fun > FloatArray.sortedByDescending(crossinline selector: (Float) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > DoubleArray.sortedByDescending(crossinline selector: (Double) -> R?): List +public expect inline fun > DoubleArray.sortedByDescending(crossinline selector: (Double) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > BooleanArray.sortedByDescending(crossinline selector: (Boolean) -> R?): List +public expect inline fun > BooleanArray.sortedByDescending(crossinline selector: (Boolean) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > CharArray.sortedByDescending(crossinline selector: (Char) -> R?): List +public expect inline fun > CharArray.sortedByDescending(crossinline selector: (Char) -> R?): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun > Array.sortedDescending(): List +public expect fun > Array.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun ByteArray.sortedDescending(): List +public expect fun ByteArray.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun ShortArray.sortedDescending(): List +public expect fun ShortArray.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun IntArray.sortedDescending(): List +public expect fun IntArray.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun LongArray.sortedDescending(): List +public expect fun LongArray.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun FloatArray.sortedDescending(): List +public expect fun FloatArray.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun DoubleArray.sortedDescending(): List +public expect fun DoubleArray.sortedDescending(): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun CharArray.sortedDescending(): List +public expect fun CharArray.sortedDescending(): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun Array.sortedWith(comparator: Comparator): List +public expect fun Array.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun ByteArray.sortedWith(comparator: Comparator): List +public expect fun ByteArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun ShortArray.sortedWith(comparator: Comparator): List +public expect fun ShortArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun IntArray.sortedWith(comparator: Comparator): List +public expect fun IntArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun LongArray.sortedWith(comparator: Comparator): List +public expect fun LongArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun FloatArray.sortedWith(comparator: Comparator): List +public expect fun FloatArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun DoubleArray.sortedWith(comparator: Comparator): List +public expect fun DoubleArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun BooleanArray.sortedWith(comparator: Comparator): List +public expect fun BooleanArray.sortedWith(comparator: Comparator): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun CharArray.sortedWith(comparator: Comparator): List +public expect fun CharArray.sortedWith(comparator: Comparator): List /** * Returns `true` if the two specified arrays are *deeply* equal to one another, @@ -2809,7 +2809,7 @@ public header fun CharArray.sortedWith(comparator: Comparator): List Array.contentDeepEquals(other: Array): Boolean +public expect infix fun Array.contentDeepEquals(other: Array): Boolean /** * Returns a hash code based on the contents of this array as if it is [List]. @@ -2818,7 +2818,7 @@ public header infix fun Array.contentDeepEquals(other: Array): * If any of arrays contains itself on any nesting level the behavior is undefined. */ @SinceKotlin("1.1") -public header fun Array.contentDeepHashCode(): Int +public expect fun Array.contentDeepHashCode(): Int /** * Returns a string representation of the contents of this array as if it is a [List]. @@ -2830,124 +2830,124 @@ public header fun Array.contentDeepHashCode(): Int * @sample samples.collections.Arrays.ContentOperations.contentDeepToString */ @SinceKotlin("1.1") -public header fun Array.contentDeepToString(): String +public expect fun Array.contentDeepToString(): String /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun Array.contentEquals(other: Array): Boolean +public expect infix fun Array.contentEquals(other: Array): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun ByteArray.contentEquals(other: ByteArray): Boolean +public expect infix fun ByteArray.contentEquals(other: ByteArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun ShortArray.contentEquals(other: ShortArray): Boolean +public expect infix fun ShortArray.contentEquals(other: ShortArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun IntArray.contentEquals(other: IntArray): Boolean +public expect infix fun IntArray.contentEquals(other: IntArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun LongArray.contentEquals(other: LongArray): Boolean +public expect infix fun LongArray.contentEquals(other: LongArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun FloatArray.contentEquals(other: FloatArray): Boolean +public expect infix fun FloatArray.contentEquals(other: FloatArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun DoubleArray.contentEquals(other: DoubleArray): Boolean +public expect infix fun DoubleArray.contentEquals(other: DoubleArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun BooleanArray.contentEquals(other: BooleanArray): Boolean +public expect infix fun BooleanArray.contentEquals(other: BooleanArray): Boolean /** * Returns `true` if the two specified arrays are *structurally* equal to one another, * i.e. contain the same number of the same elements in the same order. */ @SinceKotlin("1.1") -public header infix fun CharArray.contentEquals(other: CharArray): Boolean +public expect infix fun CharArray.contentEquals(other: CharArray): Boolean /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun Array.contentHashCode(): Int +public expect fun Array.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun ByteArray.contentHashCode(): Int +public expect fun ByteArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun ShortArray.contentHashCode(): Int +public expect fun ShortArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun IntArray.contentHashCode(): Int +public expect fun IntArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun LongArray.contentHashCode(): Int +public expect fun LongArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun FloatArray.contentHashCode(): Int +public expect fun FloatArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun DoubleArray.contentHashCode(): Int +public expect fun DoubleArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun BooleanArray.contentHashCode(): Int +public expect fun BooleanArray.contentHashCode(): Int /** * Returns a hash code based on the contents of this array as if it is [List]. */ @SinceKotlin("1.1") -public header fun CharArray.contentHashCode(): Int +public expect fun CharArray.contentHashCode(): Int /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -2955,7 +2955,7 @@ public header fun CharArray.contentHashCode(): Int * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun Array.contentToString(): String +public expect fun Array.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -2963,7 +2963,7 @@ public header fun Array.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun ByteArray.contentToString(): String +public expect fun ByteArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -2971,7 +2971,7 @@ public header fun ByteArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun ShortArray.contentToString(): String +public expect fun ShortArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -2979,7 +2979,7 @@ public header fun ShortArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun IntArray.contentToString(): String +public expect fun IntArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -2987,7 +2987,7 @@ public header fun IntArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun LongArray.contentToString(): String +public expect fun LongArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -2995,7 +2995,7 @@ public header fun LongArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun FloatArray.contentToString(): String +public expect fun FloatArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -3003,7 +3003,7 @@ public header fun FloatArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun DoubleArray.contentToString(): String +public expect fun DoubleArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -3011,7 +3011,7 @@ public header fun DoubleArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun BooleanArray.contentToString(): String +public expect fun BooleanArray.contentToString(): String /** * Returns a string representation of the contents of the specified array as if it is [List]. @@ -3019,245 +3019,245 @@ public header fun BooleanArray.contentToString(): String * @sample samples.collections.Arrays.ContentOperations.contentToString */ @SinceKotlin("1.1") -public header fun CharArray.contentToString(): String +public expect fun CharArray.contentToString(): String /** * Returns the range of valid indices for the array. */ -public header val Array.indices: IntRange +public expect val Array.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val ByteArray.indices: IntRange +public expect val ByteArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val ShortArray.indices: IntRange +public expect val ShortArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val IntArray.indices: IntRange +public expect val IntArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val LongArray.indices: IntRange +public expect val LongArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val FloatArray.indices: IntRange +public expect val FloatArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val DoubleArray.indices: IntRange +public expect val DoubleArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val BooleanArray.indices: IntRange +public expect val BooleanArray.indices: IntRange /** * Returns the range of valid indices for the array. */ -public header val CharArray.indices: IntRange +public expect val CharArray.indices: IntRange /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun Array.isEmpty(): Boolean +public expect inline fun Array.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.isEmpty(): Boolean +public expect inline fun ByteArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.isEmpty(): Boolean +public expect inline fun ShortArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.isEmpty(): Boolean +public expect inline fun IntArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.isEmpty(): Boolean +public expect inline fun LongArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.isEmpty(): Boolean +public expect inline fun FloatArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.isEmpty(): Boolean +public expect inline fun DoubleArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.isEmpty(): Boolean +public expect inline fun BooleanArray.isEmpty(): Boolean /** * Returns `true` if the array is empty. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.isEmpty(): Boolean +public expect inline fun CharArray.isEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun Array.isNotEmpty(): Boolean +public expect inline fun Array.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.isNotEmpty(): Boolean +public expect inline fun ByteArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.isNotEmpty(): Boolean +public expect inline fun ShortArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.isNotEmpty(): Boolean +public expect inline fun IntArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.isNotEmpty(): Boolean +public expect inline fun LongArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.isNotEmpty(): Boolean +public expect inline fun FloatArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.isNotEmpty(): Boolean +public expect inline fun DoubleArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.isNotEmpty(): Boolean +public expect inline fun BooleanArray.isNotEmpty(): Boolean /** * Returns `true` if the array is not empty. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.isNotEmpty(): Boolean +public expect inline fun CharArray.isNotEmpty(): Boolean /** * Returns the last valid index for the array. */ -public header val Array.lastIndex: Int +public expect val Array.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val ByteArray.lastIndex: Int +public expect val ByteArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val ShortArray.lastIndex: Int +public expect val ShortArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val IntArray.lastIndex: Int +public expect val IntArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val LongArray.lastIndex: Int +public expect val LongArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val FloatArray.lastIndex: Int +public expect val FloatArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val DoubleArray.lastIndex: Int +public expect val DoubleArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val BooleanArray.lastIndex: Int +public expect val BooleanArray.lastIndex: Int /** * Returns the last valid index for the array. */ -public header val CharArray.lastIndex: Int +public expect val CharArray.lastIndex: Int /** * Returns an array of Boolean containing all of the elements of this generic array. */ -public header fun Array.toBooleanArray(): BooleanArray +public expect fun Array.toBooleanArray(): BooleanArray /** * Returns an array of Byte containing all of the elements of this generic array. */ -public header fun Array.toByteArray(): ByteArray +public expect fun Array.toByteArray(): ByteArray /** * Returns an array of Char containing all of the elements of this generic array. */ -public header fun Array.toCharArray(): CharArray +public expect fun Array.toCharArray(): CharArray /** * Returns an array of Double containing all of the elements of this generic array. */ -public header fun Array.toDoubleArray(): DoubleArray +public expect fun Array.toDoubleArray(): DoubleArray /** * Returns an array of Float containing all of the elements of this generic array. */ -public header fun Array.toFloatArray(): FloatArray +public expect fun Array.toFloatArray(): FloatArray /** * Returns an array of Int containing all of the elements of this generic array. */ -public header fun Array.toIntArray(): IntArray +public expect fun Array.toIntArray(): IntArray /** * Returns an array of Long containing all of the elements of this generic array. */ -public header fun Array.toLongArray(): LongArray +public expect fun Array.toLongArray(): LongArray /** * Returns an array of Short containing all of the elements of this generic array. */ -public header fun Array.toShortArray(): ShortArray +public expect fun Array.toShortArray(): ShortArray /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3267,7 +3267,7 @@ public header fun Array.toShortArray(): ShortArray * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun Array.associate(transform: (T) -> Pair): Map +public expect inline fun Array.associate(transform: (T) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3277,7 +3277,7 @@ public header inline fun Array.associate(transform: (T) -> Pair * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun ByteArray.associate(transform: (Byte) -> Pair): Map +public expect inline fun ByteArray.associate(transform: (Byte) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3287,7 +3287,7 @@ public header inline fun ByteArray.associate(transform: (Byte) -> Pair ShortArray.associate(transform: (Short) -> Pair): Map +public expect inline fun ShortArray.associate(transform: (Short) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3297,7 +3297,7 @@ public header inline fun ShortArray.associate(transform: (Short) -> Pair< * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun IntArray.associate(transform: (Int) -> Pair): Map +public expect inline fun IntArray.associate(transform: (Int) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3307,7 +3307,7 @@ public header inline fun IntArray.associate(transform: (Int) -> Pair LongArray.associate(transform: (Long) -> Pair): Map +public expect inline fun LongArray.associate(transform: (Long) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3317,7 +3317,7 @@ public header inline fun LongArray.associate(transform: (Long) -> Pair FloatArray.associate(transform: (Float) -> Pair): Map +public expect inline fun FloatArray.associate(transform: (Float) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3327,7 +3327,7 @@ public header inline fun FloatArray.associate(transform: (Float) -> Pair< * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun DoubleArray.associate(transform: (Double) -> Pair): Map +public expect inline fun DoubleArray.associate(transform: (Double) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3337,7 +3337,7 @@ public header inline fun DoubleArray.associate(transform: (Double) -> Pai * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun BooleanArray.associate(transform: (Boolean) -> Pair): Map +public expect inline fun BooleanArray.associate(transform: (Boolean) -> Pair): Map /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -3347,7 +3347,7 @@ public header inline fun BooleanArray.associate(transform: (Boolean) -> P * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun CharArray.associate(transform: (Char) -> Pair): Map +public expect inline fun CharArray.associate(transform: (Char) -> Pair): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3357,7 +3357,7 @@ public header inline fun CharArray.associate(transform: (Char) -> Pair Array.associateBy(keySelector: (T) -> K): Map +public expect inline fun Array.associateBy(keySelector: (T) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3367,7 +3367,7 @@ public header inline fun Array.associateBy(keySelector: (T) -> K): * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun ByteArray.associateBy(keySelector: (Byte) -> K): Map +public expect inline fun ByteArray.associateBy(keySelector: (Byte) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3377,7 +3377,7 @@ public header inline fun ByteArray.associateBy(keySelector: (Byte) -> K): Ma * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun ShortArray.associateBy(keySelector: (Short) -> K): Map +public expect inline fun ShortArray.associateBy(keySelector: (Short) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3387,7 +3387,7 @@ public header inline fun ShortArray.associateBy(keySelector: (Short) -> K): * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun IntArray.associateBy(keySelector: (Int) -> K): Map +public expect inline fun IntArray.associateBy(keySelector: (Int) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3397,7 +3397,7 @@ public header inline fun IntArray.associateBy(keySelector: (Int) -> K): Map< * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun LongArray.associateBy(keySelector: (Long) -> K): Map +public expect inline fun LongArray.associateBy(keySelector: (Long) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3407,7 +3407,7 @@ public header inline fun LongArray.associateBy(keySelector: (Long) -> K): Ma * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun FloatArray.associateBy(keySelector: (Float) -> K): Map +public expect inline fun FloatArray.associateBy(keySelector: (Float) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3417,7 +3417,7 @@ public header inline fun FloatArray.associateBy(keySelector: (Float) -> K): * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun DoubleArray.associateBy(keySelector: (Double) -> K): Map +public expect inline fun DoubleArray.associateBy(keySelector: (Double) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3427,7 +3427,7 @@ public header inline fun DoubleArray.associateBy(keySelector: (Double) -> K) * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun BooleanArray.associateBy(keySelector: (Boolean) -> K): Map +public expect inline fun BooleanArray.associateBy(keySelector: (Boolean) -> K): Map /** * Returns a [Map] containing the elements from the given array indexed by the key @@ -3437,7 +3437,7 @@ public header inline fun BooleanArray.associateBy(keySelector: (Boolean) -> * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun CharArray.associateBy(keySelector: (Char) -> K): Map +public expect inline fun CharArray.associateBy(keySelector: (Char) -> K): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3446,7 +3446,7 @@ public header inline fun CharArray.associateBy(keySelector: (Char) -> K): Ma * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun Array.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map +public expect inline fun Array.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3455,7 +3455,7 @@ public header inline fun Array.associateBy(keySelector: (T) -> * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun ByteArray.associateBy(keySelector: (Byte) -> K, valueTransform: (Byte) -> V): Map +public expect inline fun ByteArray.associateBy(keySelector: (Byte) -> K, valueTransform: (Byte) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3464,7 +3464,7 @@ public header inline fun ByteArray.associateBy(keySelector: (Byte) -> K, * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun ShortArray.associateBy(keySelector: (Short) -> K, valueTransform: (Short) -> V): Map +public expect inline fun ShortArray.associateBy(keySelector: (Short) -> K, valueTransform: (Short) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3473,7 +3473,7 @@ public header inline fun ShortArray.associateBy(keySelector: (Short) -> K * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun IntArray.associateBy(keySelector: (Int) -> K, valueTransform: (Int) -> V): Map +public expect inline fun IntArray.associateBy(keySelector: (Int) -> K, valueTransform: (Int) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3482,7 +3482,7 @@ public header inline fun IntArray.associateBy(keySelector: (Int) -> K, va * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun LongArray.associateBy(keySelector: (Long) -> K, valueTransform: (Long) -> V): Map +public expect inline fun LongArray.associateBy(keySelector: (Long) -> K, valueTransform: (Long) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3491,7 +3491,7 @@ public header inline fun LongArray.associateBy(keySelector: (Long) -> K, * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun FloatArray.associateBy(keySelector: (Float) -> K, valueTransform: (Float) -> V): Map +public expect inline fun FloatArray.associateBy(keySelector: (Float) -> K, valueTransform: (Float) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3500,7 +3500,7 @@ public header inline fun FloatArray.associateBy(keySelector: (Float) -> K * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun DoubleArray.associateBy(keySelector: (Double) -> K, valueTransform: (Double) -> V): Map +public expect inline fun DoubleArray.associateBy(keySelector: (Double) -> K, valueTransform: (Double) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3509,7 +3509,7 @@ public header inline fun DoubleArray.associateBy(keySelector: (Double) -> * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun BooleanArray.associateBy(keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): Map +public expect inline fun BooleanArray.associateBy(keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array. @@ -3518,7 +3518,7 @@ public header inline fun BooleanArray.associateBy(keySelector: (Boolean) * * The returned map preserves the entry iteration order of the original array. */ -public header inline fun CharArray.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map +public expect inline fun CharArray.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3527,7 +3527,7 @@ public header inline fun CharArray.associateBy(keySelector: (Char) -> K, * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > Array.associateByTo(destination: M, keySelector: (T) -> K): M +public expect inline fun > Array.associateByTo(destination: M, keySelector: (T) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3536,7 +3536,7 @@ public header inline fun > Array.associa * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > ByteArray.associateByTo(destination: M, keySelector: (Byte) -> K): M +public expect inline fun > ByteArray.associateByTo(destination: M, keySelector: (Byte) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3545,7 +3545,7 @@ public header inline fun > ByteArray.associateB * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > ShortArray.associateByTo(destination: M, keySelector: (Short) -> K): M +public expect inline fun > ShortArray.associateByTo(destination: M, keySelector: (Short) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3554,7 +3554,7 @@ public header inline fun > ShortArray.associat * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > IntArray.associateByTo(destination: M, keySelector: (Int) -> K): M +public expect inline fun > IntArray.associateByTo(destination: M, keySelector: (Int) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3563,7 +3563,7 @@ public header inline fun > IntArray.associateByT * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > LongArray.associateByTo(destination: M, keySelector: (Long) -> K): M +public expect inline fun > LongArray.associateByTo(destination: M, keySelector: (Long) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3572,7 +3572,7 @@ public header inline fun > LongArray.associateB * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > FloatArray.associateByTo(destination: M, keySelector: (Float) -> K): M +public expect inline fun > FloatArray.associateByTo(destination: M, keySelector: (Float) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3581,7 +3581,7 @@ public header inline fun > FloatArray.associat * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > DoubleArray.associateByTo(destination: M, keySelector: (Double) -> K): M +public expect inline fun > DoubleArray.associateByTo(destination: M, keySelector: (Double) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3590,7 +3590,7 @@ public header inline fun > DoubleArray.associ * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > BooleanArray.associateByTo(destination: M, keySelector: (Boolean) -> K): M +public expect inline fun > BooleanArray.associateByTo(destination: M, keySelector: (Boolean) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3599,7 +3599,7 @@ public header inline fun > BooleanArray.asso * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > CharArray.associateByTo(destination: M, keySelector: (Char) -> K): M +public expect inline fun > CharArray.associateByTo(destination: M, keySelector: (Char) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3608,7 +3608,7 @@ public header inline fun > CharArray.associateB * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > Array.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M +public expect inline fun > Array.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3617,7 +3617,7 @@ public header inline fun > Array.asso * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > ByteArray.associateByTo(destination: M, keySelector: (Byte) -> K, valueTransform: (Byte) -> V): M +public expect inline fun > ByteArray.associateByTo(destination: M, keySelector: (Byte) -> K, valueTransform: (Byte) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3626,7 +3626,7 @@ public header inline fun > ByteArray.associateB * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > ShortArray.associateByTo(destination: M, keySelector: (Short) -> K, valueTransform: (Short) -> V): M +public expect inline fun > ShortArray.associateByTo(destination: M, keySelector: (Short) -> K, valueTransform: (Short) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3635,7 +3635,7 @@ public header inline fun > ShortArray.associate * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > IntArray.associateByTo(destination: M, keySelector: (Int) -> K, valueTransform: (Int) -> V): M +public expect inline fun > IntArray.associateByTo(destination: M, keySelector: (Int) -> K, valueTransform: (Int) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3644,7 +3644,7 @@ public header inline fun > IntArray.associateBy * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > LongArray.associateByTo(destination: M, keySelector: (Long) -> K, valueTransform: (Long) -> V): M +public expect inline fun > LongArray.associateByTo(destination: M, keySelector: (Long) -> K, valueTransform: (Long) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3653,7 +3653,7 @@ public header inline fun > LongArray.associateB * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > FloatArray.associateByTo(destination: M, keySelector: (Float) -> K, valueTransform: (Float) -> V): M +public expect inline fun > FloatArray.associateByTo(destination: M, keySelector: (Float) -> K, valueTransform: (Float) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3662,7 +3662,7 @@ public header inline fun > FloatArray.associate * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > DoubleArray.associateByTo(destination: M, keySelector: (Double) -> K, valueTransform: (Double) -> V): M +public expect inline fun > DoubleArray.associateByTo(destination: M, keySelector: (Double) -> K, valueTransform: (Double) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3671,7 +3671,7 @@ public header inline fun > DoubleArray.associat * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > BooleanArray.associateByTo(destination: M, keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): M +public expect inline fun > BooleanArray.associateByTo(destination: M, keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -3680,7 +3680,7 @@ public header inline fun > BooleanArray.associa * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > CharArray.associateByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M +public expect inline fun > CharArray.associateByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3688,7 +3688,7 @@ public header inline fun > CharArray.associateB * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > Array.associateTo(destination: M, transform: (T) -> Pair): M +public expect inline fun > Array.associateTo(destination: M, transform: (T) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3696,7 +3696,7 @@ public header inline fun > Array.asso * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > ByteArray.associateTo(destination: M, transform: (Byte) -> Pair): M +public expect inline fun > ByteArray.associateTo(destination: M, transform: (Byte) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3704,7 +3704,7 @@ public header inline fun > ByteArray.associateT * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > ShortArray.associateTo(destination: M, transform: (Short) -> Pair): M +public expect inline fun > ShortArray.associateTo(destination: M, transform: (Short) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3712,7 +3712,7 @@ public header inline fun > ShortArray.associate * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > IntArray.associateTo(destination: M, transform: (Int) -> Pair): M +public expect inline fun > IntArray.associateTo(destination: M, transform: (Int) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3720,7 +3720,7 @@ public header inline fun > IntArray.associateTo * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > LongArray.associateTo(destination: M, transform: (Long) -> Pair): M +public expect inline fun > LongArray.associateTo(destination: M, transform: (Long) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3728,7 +3728,7 @@ public header inline fun > LongArray.associateT * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > FloatArray.associateTo(destination: M, transform: (Float) -> Pair): M +public expect inline fun > FloatArray.associateTo(destination: M, transform: (Float) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3736,7 +3736,7 @@ public header inline fun > FloatArray.associate * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > DoubleArray.associateTo(destination: M, transform: (Double) -> Pair): M +public expect inline fun > DoubleArray.associateTo(destination: M, transform: (Double) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3744,7 +3744,7 @@ public header inline fun > DoubleArray.associat * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > BooleanArray.associateTo(destination: M, transform: (Boolean) -> Pair): M +public expect inline fun > BooleanArray.associateTo(destination: M, transform: (Boolean) -> Pair): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -3752,340 +3752,340 @@ public header inline fun > BooleanArray.associa * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > CharArray.associateTo(destination: M, transform: (Char) -> Pair): M +public expect inline fun > CharArray.associateTo(destination: M, transform: (Char) -> Pair): M /** * Appends all elements to the given [destination] collection. */ -public header fun > Array.toCollection(destination: C): C +public expect fun > Array.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > ByteArray.toCollection(destination: C): C +public expect fun > ByteArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > ShortArray.toCollection(destination: C): C +public expect fun > ShortArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > IntArray.toCollection(destination: C): C +public expect fun > IntArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > LongArray.toCollection(destination: C): C +public expect fun > LongArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > FloatArray.toCollection(destination: C): C +public expect fun > FloatArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > DoubleArray.toCollection(destination: C): C +public expect fun > DoubleArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > BooleanArray.toCollection(destination: C): C +public expect fun > BooleanArray.toCollection(destination: C): C /** * Appends all elements to the given [destination] collection. */ -public header fun > CharArray.toCollection(destination: C): C +public expect fun > CharArray.toCollection(destination: C): C /** * Returns a [HashSet] of all elements. */ -public header fun Array.toHashSet(): HashSet +public expect fun Array.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun ByteArray.toHashSet(): HashSet +public expect fun ByteArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun ShortArray.toHashSet(): HashSet +public expect fun ShortArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun IntArray.toHashSet(): HashSet +public expect fun IntArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun LongArray.toHashSet(): HashSet +public expect fun LongArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun FloatArray.toHashSet(): HashSet +public expect fun FloatArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun DoubleArray.toHashSet(): HashSet +public expect fun DoubleArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun BooleanArray.toHashSet(): HashSet +public expect fun BooleanArray.toHashSet(): HashSet /** * Returns a [HashSet] of all elements. */ -public header fun CharArray.toHashSet(): HashSet +public expect fun CharArray.toHashSet(): HashSet /** * Returns a [List] containing all elements. */ -public header fun Array.toList(): List +public expect fun Array.toList(): List /** * Returns a [List] containing all elements. */ -public header fun ByteArray.toList(): List +public expect fun ByteArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun ShortArray.toList(): List +public expect fun ShortArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun IntArray.toList(): List +public expect fun IntArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun LongArray.toList(): List +public expect fun LongArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun FloatArray.toList(): List +public expect fun FloatArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun DoubleArray.toList(): List +public expect fun DoubleArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun BooleanArray.toList(): List +public expect fun BooleanArray.toList(): List /** * Returns a [List] containing all elements. */ -public header fun CharArray.toList(): List +public expect fun CharArray.toList(): List /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun Array.toMutableList(): MutableList +public expect fun Array.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun ByteArray.toMutableList(): MutableList +public expect fun ByteArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun ShortArray.toMutableList(): MutableList +public expect fun ShortArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun IntArray.toMutableList(): MutableList +public expect fun IntArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun LongArray.toMutableList(): MutableList +public expect fun LongArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun FloatArray.toMutableList(): MutableList +public expect fun FloatArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun DoubleArray.toMutableList(): MutableList +public expect fun DoubleArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun BooleanArray.toMutableList(): MutableList +public expect fun BooleanArray.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this array. */ -public header fun CharArray.toMutableList(): MutableList +public expect fun CharArray.toMutableList(): MutableList /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun Array.toSet(): Set +public expect fun Array.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun ByteArray.toSet(): Set +public expect fun ByteArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun ShortArray.toSet(): Set +public expect fun ShortArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun IntArray.toSet(): Set +public expect fun IntArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun LongArray.toSet(): Set +public expect fun LongArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun FloatArray.toSet(): Set +public expect fun FloatArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun DoubleArray.toSet(): Set +public expect fun DoubleArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun BooleanArray.toSet(): Set +public expect fun BooleanArray.toSet(): Set /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original array. */ -public header fun CharArray.toSet(): Set +public expect fun CharArray.toSet(): Set /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun Array.flatMap(transform: (T) -> Iterable): List +public expect inline fun Array.flatMap(transform: (T) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun ByteArray.flatMap(transform: (Byte) -> Iterable): List +public expect inline fun ByteArray.flatMap(transform: (Byte) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun ShortArray.flatMap(transform: (Short) -> Iterable): List +public expect inline fun ShortArray.flatMap(transform: (Short) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun IntArray.flatMap(transform: (Int) -> Iterable): List +public expect inline fun IntArray.flatMap(transform: (Int) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun LongArray.flatMap(transform: (Long) -> Iterable): List +public expect inline fun LongArray.flatMap(transform: (Long) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun FloatArray.flatMap(transform: (Float) -> Iterable): List +public expect inline fun FloatArray.flatMap(transform: (Float) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun DoubleArray.flatMap(transform: (Double) -> Iterable): List +public expect inline fun DoubleArray.flatMap(transform: (Double) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun BooleanArray.flatMap(transform: (Boolean) -> Iterable): List +public expect inline fun BooleanArray.flatMap(transform: (Boolean) -> Iterable): List /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original array. */ -public header inline fun CharArray.flatMap(transform: (Char) -> Iterable): List +public expect inline fun CharArray.flatMap(transform: (Char) -> Iterable): List /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > Array.flatMapTo(destination: C, transform: (T) -> Iterable): C +public expect inline fun > Array.flatMapTo(destination: C, transform: (T) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > ByteArray.flatMapTo(destination: C, transform: (Byte) -> Iterable): C +public expect inline fun > ByteArray.flatMapTo(destination: C, transform: (Byte) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > ShortArray.flatMapTo(destination: C, transform: (Short) -> Iterable): C +public expect inline fun > ShortArray.flatMapTo(destination: C, transform: (Short) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > IntArray.flatMapTo(destination: C, transform: (Int) -> Iterable): C +public expect inline fun > IntArray.flatMapTo(destination: C, transform: (Int) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > LongArray.flatMapTo(destination: C, transform: (Long) -> Iterable): C +public expect inline fun > LongArray.flatMapTo(destination: C, transform: (Long) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > FloatArray.flatMapTo(destination: C, transform: (Float) -> Iterable): C +public expect inline fun > FloatArray.flatMapTo(destination: C, transform: (Float) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > DoubleArray.flatMapTo(destination: C, transform: (Double) -> Iterable): C +public expect inline fun > DoubleArray.flatMapTo(destination: C, transform: (Double) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > BooleanArray.flatMapTo(destination: C, transform: (Boolean) -> Iterable): C +public expect inline fun > BooleanArray.flatMapTo(destination: C, transform: (Boolean) -> Iterable): C /** * Appends all elements yielded from results of [transform] function being invoked on each element of original array, to the given [destination]. */ -public header inline fun > CharArray.flatMapTo(destination: C, transform: (Char) -> Iterable): C +public expect inline fun > CharArray.flatMapTo(destination: C, transform: (Char) -> Iterable): C /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4095,7 +4095,7 @@ public header inline fun > CharArray.flatMapTo(de * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun Array.groupBy(keySelector: (T) -> K): Map> +public expect inline fun Array.groupBy(keySelector: (T) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4105,7 +4105,7 @@ public header inline fun Array.groupBy(keySelector: (T) -> K): Map * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun ByteArray.groupBy(keySelector: (Byte) -> K): Map> +public expect inline fun ByteArray.groupBy(keySelector: (Byte) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4115,7 +4115,7 @@ public header inline fun ByteArray.groupBy(keySelector: (Byte) -> K): Map ShortArray.groupBy(keySelector: (Short) -> K): Map> +public expect inline fun ShortArray.groupBy(keySelector: (Short) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4125,7 +4125,7 @@ public header inline fun ShortArray.groupBy(keySelector: (Short) -> K): Map< * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun IntArray.groupBy(keySelector: (Int) -> K): Map> +public expect inline fun IntArray.groupBy(keySelector: (Int) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4135,7 +4135,7 @@ public header inline fun IntArray.groupBy(keySelector: (Int) -> K): Map LongArray.groupBy(keySelector: (Long) -> K): Map> +public expect inline fun LongArray.groupBy(keySelector: (Long) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4145,7 +4145,7 @@ public header inline fun LongArray.groupBy(keySelector: (Long) -> K): Map FloatArray.groupBy(keySelector: (Float) -> K): Map> +public expect inline fun FloatArray.groupBy(keySelector: (Float) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4155,7 +4155,7 @@ public header inline fun FloatArray.groupBy(keySelector: (Float) -> K): Map< * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun DoubleArray.groupBy(keySelector: (Double) -> K): Map> +public expect inline fun DoubleArray.groupBy(keySelector: (Double) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4165,7 +4165,7 @@ public header inline fun DoubleArray.groupBy(keySelector: (Double) -> K): Ma * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun BooleanArray.groupBy(keySelector: (Boolean) -> K): Map> +public expect inline fun BooleanArray.groupBy(keySelector: (Boolean) -> K): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4175,7 +4175,7 @@ public header inline fun BooleanArray.groupBy(keySelector: (Boolean) -> K): * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun CharArray.groupBy(keySelector: (Char) -> K): Map> +public expect inline fun CharArray.groupBy(keySelector: (Char) -> K): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4186,7 +4186,7 @@ public header inline fun CharArray.groupBy(keySelector: (Char) -> K): Map Array.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> +public expect inline fun Array.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4197,7 +4197,7 @@ public header inline fun Array.groupBy(keySelector: (T) -> K, v * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun ByteArray.groupBy(keySelector: (Byte) -> K, valueTransform: (Byte) -> V): Map> +public expect inline fun ByteArray.groupBy(keySelector: (Byte) -> K, valueTransform: (Byte) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4208,7 +4208,7 @@ public header inline fun ByteArray.groupBy(keySelector: (Byte) -> K, valu * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun ShortArray.groupBy(keySelector: (Short) -> K, valueTransform: (Short) -> V): Map> +public expect inline fun ShortArray.groupBy(keySelector: (Short) -> K, valueTransform: (Short) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4219,7 +4219,7 @@ public header inline fun ShortArray.groupBy(keySelector: (Short) -> K, va * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun IntArray.groupBy(keySelector: (Int) -> K, valueTransform: (Int) -> V): Map> +public expect inline fun IntArray.groupBy(keySelector: (Int) -> K, valueTransform: (Int) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4230,7 +4230,7 @@ public header inline fun IntArray.groupBy(keySelector: (Int) -> K, valueT * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun LongArray.groupBy(keySelector: (Long) -> K, valueTransform: (Long) -> V): Map> +public expect inline fun LongArray.groupBy(keySelector: (Long) -> K, valueTransform: (Long) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4241,7 +4241,7 @@ public header inline fun LongArray.groupBy(keySelector: (Long) -> K, valu * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun FloatArray.groupBy(keySelector: (Float) -> K, valueTransform: (Float) -> V): Map> +public expect inline fun FloatArray.groupBy(keySelector: (Float) -> K, valueTransform: (Float) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4252,7 +4252,7 @@ public header inline fun FloatArray.groupBy(keySelector: (Float) -> K, va * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun DoubleArray.groupBy(keySelector: (Double) -> K, valueTransform: (Double) -> V): Map> +public expect inline fun DoubleArray.groupBy(keySelector: (Double) -> K, valueTransform: (Double) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4263,7 +4263,7 @@ public header inline fun DoubleArray.groupBy(keySelector: (Double) -> K, * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun BooleanArray.groupBy(keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): Map> +public expect inline fun BooleanArray.groupBy(keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4274,7 +4274,7 @@ public header inline fun BooleanArray.groupBy(keySelector: (Boolean) -> K * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun CharArray.groupBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map> +public expect inline fun CharArray.groupBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map> /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4284,7 +4284,7 @@ public header inline fun CharArray.groupBy(keySelector: (Char) -> K, valu * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> Array.groupByTo(destination: M, keySelector: (T) -> K): M +public expect inline fun >> Array.groupByTo(destination: M, keySelector: (T) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4294,7 +4294,7 @@ public header inline fun >> Array>> ByteArray.groupByTo(destination: M, keySelector: (Byte) -> K): M +public expect inline fun >> ByteArray.groupByTo(destination: M, keySelector: (Byte) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4304,7 +4304,7 @@ public header inline fun >> ByteArray. * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> ShortArray.groupByTo(destination: M, keySelector: (Short) -> K): M +public expect inline fun >> ShortArray.groupByTo(destination: M, keySelector: (Short) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4314,7 +4314,7 @@ public header inline fun >> ShortArra * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> IntArray.groupByTo(destination: M, keySelector: (Int) -> K): M +public expect inline fun >> IntArray.groupByTo(destination: M, keySelector: (Int) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4324,7 +4324,7 @@ public header inline fun >> IntArray.gr * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> LongArray.groupByTo(destination: M, keySelector: (Long) -> K): M +public expect inline fun >> LongArray.groupByTo(destination: M, keySelector: (Long) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4334,7 +4334,7 @@ public header inline fun >> LongArray. * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> FloatArray.groupByTo(destination: M, keySelector: (Float) -> K): M +public expect inline fun >> FloatArray.groupByTo(destination: M, keySelector: (Float) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4344,7 +4344,7 @@ public header inline fun >> FloatArra * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> DoubleArray.groupByTo(destination: M, keySelector: (Double) -> K): M +public expect inline fun >> DoubleArray.groupByTo(destination: M, keySelector: (Double) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4354,7 +4354,7 @@ public header inline fun >> DoubleAr * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> BooleanArray.groupByTo(destination: M, keySelector: (Boolean) -> K): M +public expect inline fun >> BooleanArray.groupByTo(destination: M, keySelector: (Boolean) -> K): M /** * Groups elements of the original array by the key returned by the given [keySelector] function @@ -4364,7 +4364,7 @@ public header inline fun >> Boolean * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> CharArray.groupByTo(destination: M, keySelector: (Char) -> K): M +public expect inline fun >> CharArray.groupByTo(destination: M, keySelector: (Char) -> K): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4375,7 +4375,7 @@ public header inline fun >> CharArray. * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> Array.groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M +public expect inline fun >> Array.groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4386,7 +4386,7 @@ public header inline fun >> Array>> ByteArray.groupByTo(destination: M, keySelector: (Byte) -> K, valueTransform: (Byte) -> V): M +public expect inline fun >> ByteArray.groupByTo(destination: M, keySelector: (Byte) -> K, valueTransform: (Byte) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4397,7 +4397,7 @@ public header inline fun >> ByteArray. * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> ShortArray.groupByTo(destination: M, keySelector: (Short) -> K, valueTransform: (Short) -> V): M +public expect inline fun >> ShortArray.groupByTo(destination: M, keySelector: (Short) -> K, valueTransform: (Short) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4408,7 +4408,7 @@ public header inline fun >> ShortArray * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> IntArray.groupByTo(destination: M, keySelector: (Int) -> K, valueTransform: (Int) -> V): M +public expect inline fun >> IntArray.groupByTo(destination: M, keySelector: (Int) -> K, valueTransform: (Int) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4419,7 +4419,7 @@ public header inline fun >> IntArray.g * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> LongArray.groupByTo(destination: M, keySelector: (Long) -> K, valueTransform: (Long) -> V): M +public expect inline fun >> LongArray.groupByTo(destination: M, keySelector: (Long) -> K, valueTransform: (Long) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4430,7 +4430,7 @@ public header inline fun >> LongArray. * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> FloatArray.groupByTo(destination: M, keySelector: (Float) -> K, valueTransform: (Float) -> V): M +public expect inline fun >> FloatArray.groupByTo(destination: M, keySelector: (Float) -> K, valueTransform: (Float) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4441,7 +4441,7 @@ public header inline fun >> FloatArray * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> DoubleArray.groupByTo(destination: M, keySelector: (Double) -> K, valueTransform: (Double) -> V): M +public expect inline fun >> DoubleArray.groupByTo(destination: M, keySelector: (Double) -> K, valueTransform: (Double) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4452,7 +4452,7 @@ public header inline fun >> DoubleArra * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> BooleanArray.groupByTo(destination: M, keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): M +public expect inline fun >> BooleanArray.groupByTo(destination: M, keySelector: (Boolean) -> K, valueTransform: (Boolean) -> V): M /** * Groups values returned by the [valueTransform] function applied to each element of the original array @@ -4463,7 +4463,7 @@ public header inline fun >> BooleanArr * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> CharArray.groupByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M +public expect inline fun >> CharArray.groupByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M /** * Creates a [Grouping] source from an array to be used later with one of group-and-fold operations @@ -4472,61 +4472,61 @@ public header inline fun >> CharArray. * @sample samples.collections.Collections.Transformations.groupingByEachCount */ @SinceKotlin("1.1") -public header inline fun Array.groupingBy(crossinline keySelector: (T) -> K): Grouping +public expect inline fun Array.groupingBy(crossinline keySelector: (T) -> K): Grouping /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun Array.map(transform: (T) -> R): List +public expect inline fun Array.map(transform: (T) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun ByteArray.map(transform: (Byte) -> R): List +public expect inline fun ByteArray.map(transform: (Byte) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun ShortArray.map(transform: (Short) -> R): List +public expect inline fun ShortArray.map(transform: (Short) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun IntArray.map(transform: (Int) -> R): List +public expect inline fun IntArray.map(transform: (Int) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun LongArray.map(transform: (Long) -> R): List +public expect inline fun LongArray.map(transform: (Long) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun FloatArray.map(transform: (Float) -> R): List +public expect inline fun FloatArray.map(transform: (Float) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun DoubleArray.map(transform: (Double) -> R): List +public expect inline fun DoubleArray.map(transform: (Double) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun BooleanArray.map(transform: (Boolean) -> R): List +public expect inline fun BooleanArray.map(transform: (Boolean) -> R): List /** * Returns a list containing the results of applying the given [transform] function * to each element in the original array. */ -public header inline fun CharArray.map(transform: (Char) -> R): List +public expect inline fun CharArray.map(transform: (Char) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4534,7 +4534,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: (index: Int, T) -> R): List +public expect inline fun Array.mapIndexed(transform: (index: Int, T) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4542,7 +4542,7 @@ public header inline fun Array.mapIndexed(transform: (index: Int, * @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: (index: Int, Byte) -> R): List +public expect inline fun ByteArray.mapIndexed(transform: (index: Int, Byte) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4550,7 +4550,7 @@ public header inline fun ByteArray.mapIndexed(transform: (index: Int, Byte) * @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: (index: Int, Short) -> R): List +public expect inline fun ShortArray.mapIndexed(transform: (index: Int, Short) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4558,7 +4558,7 @@ public header inline fun ShortArray.mapIndexed(transform: (index: Int, Short * @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: (index: Int, Int) -> R): List +public expect inline fun IntArray.mapIndexed(transform: (index: Int, Int) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4566,7 +4566,7 @@ public header inline fun IntArray.mapIndexed(transform: (index: Int, Int) -> * @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: (index: Int, Long) -> R): List +public expect inline fun LongArray.mapIndexed(transform: (index: Int, Long) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4574,7 +4574,7 @@ public header inline fun LongArray.mapIndexed(transform: (index: Int, Long) * @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: (index: Int, Float) -> R): List +public expect inline fun FloatArray.mapIndexed(transform: (index: Int, Float) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4582,7 +4582,7 @@ public header inline fun FloatArray.mapIndexed(transform: (index: Int, Float * @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: (index: Int, Double) -> R): List +public expect inline fun DoubleArray.mapIndexed(transform: (index: Int, Double) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4590,7 +4590,7 @@ public header inline fun DoubleArray.mapIndexed(transform: (index: Int, Doub * @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: (index: Int, Boolean) -> R): List +public expect inline fun BooleanArray.mapIndexed(transform: (index: Int, Boolean) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -4598,7 +4598,7 @@ public header inline fun BooleanArray.mapIndexed(transform: (index: Int, Boo * @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: (index: Int, Char) -> R): List +public expect 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 @@ -4606,7 +4606,7 @@ public header inline fun CharArray.mapIndexed(transform: (index: Int, Char) * @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: (index: Int, T) -> R?): List +public expect 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 @@ -4614,7 +4614,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: (index: Int, T) -> R?): C +public expect 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 @@ -4622,7 +4622,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: (index: Int, T) -> R): C +public expect 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 @@ -4630,7 +4630,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: (index: Int, Byte) -> R): C +public expect 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 @@ -4638,7 +4638,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: (index: Int, Short) -> R): C +public expect 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 @@ -4646,7 +4646,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: (index: Int, Int) -> R): C +public expect 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 @@ -4654,7 +4654,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: (index: Int, Long) -> R): C +public expect 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 @@ -4662,7 +4662,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: (index: Int, Float) -> R): C +public expect 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 @@ -4670,7 +4670,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: (index: Int, Double) -> R): C +public expect 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 @@ -4678,7 +4678,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: (index: Int, Boolean) -> R): C +public expect 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 @@ -4686,181 +4686,181 @@ 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: (index: Int, Char) -> R): C +public expect 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 * to each element in the original array. */ -public header inline fun Array.mapNotNull(transform: (T) -> R?): List +public expect inline fun Array.mapNotNull(transform: (T) -> R?): List /** * Applies the given [transform] function to each element in the original array * and appends only the non-null results to the given [destination]. */ -public header inline fun > Array.mapNotNullTo(destination: C, transform: (T) -> R?): C +public expect inline fun > Array.mapNotNullTo(destination: C, transform: (T) -> R?): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > Array.mapTo(destination: C, transform: (T) -> R): C +public expect inline fun > Array.mapTo(destination: C, transform: (T) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > ByteArray.mapTo(destination: C, transform: (Byte) -> R): C +public expect inline fun > ByteArray.mapTo(destination: C, transform: (Byte) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > ShortArray.mapTo(destination: C, transform: (Short) -> R): C +public expect inline fun > ShortArray.mapTo(destination: C, transform: (Short) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > IntArray.mapTo(destination: C, transform: (Int) -> R): C +public expect inline fun > IntArray.mapTo(destination: C, transform: (Int) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > LongArray.mapTo(destination: C, transform: (Long) -> R): C +public expect inline fun > LongArray.mapTo(destination: C, transform: (Long) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > FloatArray.mapTo(destination: C, transform: (Float) -> R): C +public expect inline fun > FloatArray.mapTo(destination: C, transform: (Float) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > DoubleArray.mapTo(destination: C, transform: (Double) -> R): C +public expect inline fun > DoubleArray.mapTo(destination: C, transform: (Double) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > BooleanArray.mapTo(destination: C, transform: (Boolean) -> R): C +public expect inline fun > BooleanArray.mapTo(destination: C, transform: (Boolean) -> R): C /** * Applies the given [transform] function to each element of the original array * and appends the results to the given [destination]. */ -public header inline fun > CharArray.mapTo(destination: C, transform: (Char) -> R): C +public expect inline fun > CharArray.mapTo(destination: C, transform: (Char) -> R): C /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun Array.withIndex(): Iterable> +public expect fun Array.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun ByteArray.withIndex(): Iterable> +public expect fun ByteArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun ShortArray.withIndex(): Iterable> +public expect fun ShortArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun IntArray.withIndex(): Iterable> +public expect fun IntArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun LongArray.withIndex(): Iterable> +public expect fun LongArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun FloatArray.withIndex(): Iterable> +public expect fun FloatArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun DoubleArray.withIndex(): Iterable> +public expect fun DoubleArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun BooleanArray.withIndex(): Iterable> +public expect fun BooleanArray.withIndex(): Iterable> /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original array. */ -public header fun CharArray.withIndex(): Iterable> +public expect fun CharArray.withIndex(): Iterable> /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun Array.distinct(): List +public expect fun Array.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun ByteArray.distinct(): List +public expect fun ByteArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun ShortArray.distinct(): List +public expect fun ShortArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun IntArray.distinct(): List +public expect fun IntArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun LongArray.distinct(): List +public expect fun LongArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun FloatArray.distinct(): List +public expect fun FloatArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun DoubleArray.distinct(): List +public expect fun DoubleArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun BooleanArray.distinct(): List +public expect fun BooleanArray.distinct(): List /** * Returns a list containing only distinct elements from the given array. * * The elements in the resulting list are in the same order as they were in the source array. */ -public header fun CharArray.distinct(): List +public expect fun CharArray.distinct(): List /** * Returns a list containing only elements from the given array @@ -4868,7 +4868,7 @@ public header fun CharArray.distinct(): List * * The elements in the resulting list are in the same order as they were in the source array. */ -public header inline fun Array.distinctBy(selector: (T) -> K): List +public expect inline fun Array.distinctBy(selector: (T) -> K): List /** * Returns a list containing only elements from the given array @@ -4876,7 +4876,7 @@ public header inline fun Array.distinctBy(selector: (T) -> K): Lis * * The elements in the resulting list are in the same order as they were in the source array. */ -public header inline fun ByteArray.distinctBy(selector: (Byte) -> K): List +public expect inline fun ByteArray.distinctBy(selector: (Byte) -> K): List /** * Returns a list containing only elements from the given array @@ -4884,7 +4884,7 @@ public header inline fun ByteArray.distinctBy(selector: (Byte) -> K): List ShortArray.distinctBy(selector: (Short) -> K): List +public expect inline fun ShortArray.distinctBy(selector: (Short) -> K): List /** * Returns a list containing only elements from the given array @@ -4892,7 +4892,7 @@ public header inline fun ShortArray.distinctBy(selector: (Short) -> K): List * * The elements in the resulting list are in the same order as they were in the source array. */ -public header inline fun IntArray.distinctBy(selector: (Int) -> K): List +public expect inline fun IntArray.distinctBy(selector: (Int) -> K): List /** * Returns a list containing only elements from the given array @@ -4900,7 +4900,7 @@ public header inline fun IntArray.distinctBy(selector: (Int) -> K): List LongArray.distinctBy(selector: (Long) -> K): List +public expect inline fun LongArray.distinctBy(selector: (Long) -> K): List /** * Returns a list containing only elements from the given array @@ -4908,7 +4908,7 @@ public header inline fun LongArray.distinctBy(selector: (Long) -> K): List FloatArray.distinctBy(selector: (Float) -> K): List +public expect inline fun FloatArray.distinctBy(selector: (Float) -> K): List /** * Returns a list containing only elements from the given array @@ -4916,7 +4916,7 @@ public header inline fun FloatArray.distinctBy(selector: (Float) -> K): List * * The elements in the resulting list are in the same order as they were in the source array. */ -public header inline fun DoubleArray.distinctBy(selector: (Double) -> K): List +public expect inline fun DoubleArray.distinctBy(selector: (Double) -> K): List /** * Returns a list containing only elements from the given array @@ -4924,7 +4924,7 @@ public header inline fun DoubleArray.distinctBy(selector: (Double) -> K): Li * * The elements in the resulting list are in the same order as they were in the source array. */ -public header inline fun BooleanArray.distinctBy(selector: (Boolean) -> K): List +public expect inline fun BooleanArray.distinctBy(selector: (Boolean) -> K): List /** * Returns a list containing only elements from the given array @@ -4932,196 +4932,196 @@ public header inline fun BooleanArray.distinctBy(selector: (Boolean) -> K): * * The elements in the resulting list are in the same order as they were in the source array. */ -public header inline fun CharArray.distinctBy(selector: (Char) -> K): List +public expect inline fun CharArray.distinctBy(selector: (Char) -> K): List /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun Array.intersect(other: Iterable): Set +public expect infix fun Array.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun ByteArray.intersect(other: Iterable): Set +public expect infix fun ByteArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun ShortArray.intersect(other: Iterable): Set +public expect infix fun ShortArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun IntArray.intersect(other: Iterable): Set +public expect infix fun IntArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun LongArray.intersect(other: Iterable): Set +public expect infix fun LongArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun FloatArray.intersect(other: Iterable): Set +public expect infix fun FloatArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun DoubleArray.intersect(other: Iterable): Set +public expect infix fun DoubleArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun BooleanArray.intersect(other: Iterable): Set +public expect infix fun BooleanArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun CharArray.intersect(other: Iterable): Set +public expect infix fun CharArray.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun Array.subtract(other: Iterable): Set +public expect infix fun Array.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun ByteArray.subtract(other: Iterable): Set +public expect infix fun ByteArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun ShortArray.subtract(other: Iterable): Set +public expect infix fun ShortArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun IntArray.subtract(other: Iterable): Set +public expect infix fun IntArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun LongArray.subtract(other: Iterable): Set +public expect infix fun LongArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun FloatArray.subtract(other: Iterable): Set +public expect infix fun FloatArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun DoubleArray.subtract(other: Iterable): Set +public expect infix fun DoubleArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun BooleanArray.subtract(other: Iterable): Set +public expect infix fun BooleanArray.subtract(other: Iterable): Set /** * Returns a set containing all elements that are contained by this array and not contained by the specified collection. * * The returned set preserves the element iteration order of the original array. */ -public header infix fun CharArray.subtract(other: Iterable): Set +public expect infix fun CharArray.subtract(other: Iterable): Set /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun Array.toMutableSet(): MutableSet +public expect fun Array.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun ByteArray.toMutableSet(): MutableSet +public expect fun ByteArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun ShortArray.toMutableSet(): MutableSet +public expect fun ShortArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun IntArray.toMutableSet(): MutableSet +public expect fun IntArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun LongArray.toMutableSet(): MutableSet +public expect fun LongArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun FloatArray.toMutableSet(): MutableSet +public expect fun FloatArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun DoubleArray.toMutableSet(): MutableSet +public expect fun DoubleArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun BooleanArray.toMutableSet(): MutableSet +public expect fun BooleanArray.toMutableSet(): MutableSet /** * Returns a mutable set containing all distinct elements from the given array. * * The returned set preserves the element iteration order of the original array. */ -public header fun CharArray.toMutableSet(): MutableSet +public expect fun CharArray.toMutableSet(): MutableSet /** * Returns a set containing all distinct elements from both collections. @@ -5130,7 +5130,7 @@ public header fun CharArray.toMutableSet(): MutableSet * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun Array.union(other: Iterable): Set +public expect infix fun Array.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5139,7 +5139,7 @@ public header infix fun Array.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun ByteArray.union(other: Iterable): Set +public expect infix fun ByteArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5148,7 +5148,7 @@ public header infix fun ByteArray.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun ShortArray.union(other: Iterable): Set +public expect infix fun ShortArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5157,7 +5157,7 @@ public header infix fun ShortArray.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun IntArray.union(other: Iterable): Set +public expect infix fun IntArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5166,7 +5166,7 @@ public header infix fun IntArray.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun LongArray.union(other: Iterable): Set +public expect infix fun LongArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5175,7 +5175,7 @@ public header infix fun LongArray.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun FloatArray.union(other: Iterable): Set +public expect infix fun FloatArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5184,7 +5184,7 @@ public header infix fun FloatArray.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun DoubleArray.union(other: Iterable): Set +public expect infix fun DoubleArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5193,7 +5193,7 @@ public header infix fun DoubleArray.union(other: Iterable): Set * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun BooleanArray.union(other: Iterable): Set +public expect infix fun BooleanArray.union(other: Iterable): Set /** * Returns a set containing all distinct elements from both collections. @@ -5202,286 +5202,286 @@ public header infix fun BooleanArray.union(other: Iterable): Set): Set +public expect infix fun CharArray.union(other: Iterable): Set /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun Array.all(predicate: (T) -> Boolean): Boolean +public expect inline fun Array.all(predicate: (T) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun ByteArray.all(predicate: (Byte) -> Boolean): Boolean +public expect inline fun ByteArray.all(predicate: (Byte) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun ShortArray.all(predicate: (Short) -> Boolean): Boolean +public expect inline fun ShortArray.all(predicate: (Short) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun IntArray.all(predicate: (Int) -> Boolean): Boolean +public expect inline fun IntArray.all(predicate: (Int) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun LongArray.all(predicate: (Long) -> Boolean): Boolean +public expect inline fun LongArray.all(predicate: (Long) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun FloatArray.all(predicate: (Float) -> Boolean): Boolean +public expect inline fun FloatArray.all(predicate: (Float) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun DoubleArray.all(predicate: (Double) -> Boolean): Boolean +public expect inline fun DoubleArray.all(predicate: (Double) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun BooleanArray.all(predicate: (Boolean) -> Boolean): Boolean +public expect inline fun BooleanArray.all(predicate: (Boolean) -> Boolean): Boolean /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun CharArray.all(predicate: (Char) -> Boolean): Boolean +public expect inline fun CharArray.all(predicate: (Char) -> Boolean): Boolean /** * Returns `true` if array has at least one element. */ -public header fun Array.any(): Boolean +public expect fun Array.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun ByteArray.any(): Boolean +public expect fun ByteArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun ShortArray.any(): Boolean +public expect fun ShortArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun IntArray.any(): Boolean +public expect fun IntArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun LongArray.any(): Boolean +public expect fun LongArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun FloatArray.any(): Boolean +public expect fun FloatArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun DoubleArray.any(): Boolean +public expect fun DoubleArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun BooleanArray.any(): Boolean +public expect fun BooleanArray.any(): Boolean /** * Returns `true` if array has at least one element. */ -public header fun CharArray.any(): Boolean +public expect fun CharArray.any(): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun Array.any(predicate: (T) -> Boolean): Boolean +public expect inline fun Array.any(predicate: (T) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun ByteArray.any(predicate: (Byte) -> Boolean): Boolean +public expect inline fun ByteArray.any(predicate: (Byte) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun ShortArray.any(predicate: (Short) -> Boolean): Boolean +public expect inline fun ShortArray.any(predicate: (Short) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun IntArray.any(predicate: (Int) -> Boolean): Boolean +public expect inline fun IntArray.any(predicate: (Int) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun LongArray.any(predicate: (Long) -> Boolean): Boolean +public expect inline fun LongArray.any(predicate: (Long) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun FloatArray.any(predicate: (Float) -> Boolean): Boolean +public expect inline fun FloatArray.any(predicate: (Float) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun DoubleArray.any(predicate: (Double) -> Boolean): Boolean +public expect inline fun DoubleArray.any(predicate: (Double) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun BooleanArray.any(predicate: (Boolean) -> Boolean): Boolean +public expect inline fun BooleanArray.any(predicate: (Boolean) -> Boolean): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun CharArray.any(predicate: (Char) -> Boolean): Boolean +public expect inline fun CharArray.any(predicate: (Char) -> Boolean): Boolean /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun Array.count(): Int +public expect inline fun Array.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun ByteArray.count(): Int +public expect inline fun ByteArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun ShortArray.count(): Int +public expect inline fun ShortArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun IntArray.count(): Int +public expect inline fun IntArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun LongArray.count(): Int +public expect inline fun LongArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun FloatArray.count(): Int +public expect inline fun FloatArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun DoubleArray.count(): Int +public expect inline fun DoubleArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun BooleanArray.count(): Int +public expect inline fun BooleanArray.count(): Int /** * Returns the number of elements in this array. */ @kotlin.internal.InlineOnly -public header inline fun CharArray.count(): Int +public expect inline fun CharArray.count(): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun Array.count(predicate: (T) -> Boolean): Int +public expect inline fun Array.count(predicate: (T) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun ByteArray.count(predicate: (Byte) -> Boolean): Int +public expect inline fun ByteArray.count(predicate: (Byte) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun ShortArray.count(predicate: (Short) -> Boolean): Int +public expect inline fun ShortArray.count(predicate: (Short) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun IntArray.count(predicate: (Int) -> Boolean): Int +public expect inline fun IntArray.count(predicate: (Int) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun LongArray.count(predicate: (Long) -> Boolean): Int +public expect inline fun LongArray.count(predicate: (Long) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun FloatArray.count(predicate: (Float) -> Boolean): Int +public expect inline fun FloatArray.count(predicate: (Float) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun DoubleArray.count(predicate: (Double) -> Boolean): Int +public expect inline fun DoubleArray.count(predicate: (Double) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun BooleanArray.count(predicate: (Boolean) -> Boolean): Int +public expect inline fun BooleanArray.count(predicate: (Boolean) -> Boolean): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun CharArray.count(predicate: (Char) -> Boolean): Int +public expect 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: (acc: R, T) -> R): R +public expect 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: (acc: R, Byte) -> R): R +public expect 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: (acc: R, Short) -> R): R +public expect 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: (acc: R, Int) -> R): R +public expect 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: (acc: R, Long) -> R): R +public expect 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: (acc: R, Float) -> R): R +public expect 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: (acc: R, Double) -> R): R +public expect 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: (acc: R, Boolean) -> R): R +public expect 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: (acc: R, Char) -> R): R +public expect 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 @@ -5489,7 +5489,7 @@ public header inline fun CharArray.fold(initial: R, operation: (acc: 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: (index: Int, acc: R, T) -> R): R +public expect 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 @@ -5497,7 +5497,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: (index: Int, acc: R, Byte) -> R): R +public expect 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 @@ -5505,7 +5505,7 @@ public header inline fun ByteArray.foldIndexed(initial: R, operation: (index * @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: (index: Int, acc: R, Short) -> R): R +public expect 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 @@ -5513,7 +5513,7 @@ public header inline fun ShortArray.foldIndexed(initial: R, operation: (inde * @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: (index: Int, acc: R, Int) -> R): R +public expect 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 @@ -5521,7 +5521,7 @@ public header inline fun IntArray.foldIndexed(initial: R, operation: (index: * @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: (index: Int, acc: R, Long) -> R): R +public expect 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 @@ -5529,7 +5529,7 @@ public header inline fun LongArray.foldIndexed(initial: R, operation: (index * @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: (index: Int, acc: R, Float) -> R): R +public expect 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 @@ -5537,7 +5537,7 @@ public header inline fun FloatArray.foldIndexed(initial: R, operation: (inde * @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: (index: Int, acc: R, Double) -> R): R +public expect 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 @@ -5545,7 +5545,7 @@ public header inline fun DoubleArray.foldIndexed(initial: R, operation: (ind * @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: (index: Int, acc: R, Boolean) -> R): R +public expect 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 @@ -5553,52 +5553,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: (index: Int, acc: R, Char) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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, acc: R) -> R): R +public expect 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 @@ -5606,7 +5606,7 @@ public header inline fun CharArray.foldRight(initial: R, operation: (Char, a * @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: (index: Int, T, acc: R) -> R): R +public expect 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 @@ -5614,7 +5614,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: (index: Int, Byte, acc: R) -> R): R +public expect 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 @@ -5622,7 +5622,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: (index: Int, Short, acc: R) -> R): R +public expect 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 @@ -5630,7 +5630,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: (index: Int, Int, acc: R) -> R): R +public expect 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 @@ -5638,7 +5638,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: (index: Int, Long, acc: R) -> R): R +public expect 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 @@ -5646,7 +5646,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: (index: Int, Float, acc: R) -> R): R +public expect 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 @@ -5654,7 +5654,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: (index: Int, Double, acc: R) -> R): R +public expect 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 @@ -5662,7 +5662,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: (index: Int, Boolean, acc: R) -> R): R +public expect 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 @@ -5670,115 +5670,115 @@ 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: (index: Int, Char, acc: R) -> R): R +public expect inline fun CharArray.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R /** * Performs the given [action] on each element. */ -public header inline fun Array.forEach(action: (T) -> Unit): Unit +public expect inline fun Array.forEach(action: (T) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun ByteArray.forEach(action: (Byte) -> Unit): Unit +public expect inline fun ByteArray.forEach(action: (Byte) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun ShortArray.forEach(action: (Short) -> Unit): Unit +public expect inline fun ShortArray.forEach(action: (Short) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun IntArray.forEach(action: (Int) -> Unit): Unit +public expect inline fun IntArray.forEach(action: (Int) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun LongArray.forEach(action: (Long) -> Unit): Unit +public expect inline fun LongArray.forEach(action: (Long) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun FloatArray.forEach(action: (Float) -> Unit): Unit +public expect inline fun FloatArray.forEach(action: (Float) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun DoubleArray.forEach(action: (Double) -> Unit): Unit +public expect inline fun DoubleArray.forEach(action: (Double) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun BooleanArray.forEach(action: (Boolean) -> Unit): Unit +public expect inline fun BooleanArray.forEach(action: (Boolean) -> Unit): Unit /** * Performs the given [action] on each element. */ -public header inline fun CharArray.forEach(action: (Char) -> Unit): Unit +public expect inline fun CharArray.forEach(action: (Char) -> 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 Array.forEachIndexed(action: (index: Int, T) -> Unit): Unit +public expect 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: (index: Int, Byte) -> Unit): Unit +public expect 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: (index: Int, Short) -> Unit): Unit +public expect 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: (index: Int, Int) -> Unit): Unit +public expect 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: (index: Int, Long) -> Unit): Unit +public expect 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: (index: Int, Float) -> Unit): Unit +public expect 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: (index: Int, Double) -> Unit): Unit +public expect 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: (index: Int, Boolean) -> Unit): Unit +public expect 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: (index: Int, Char) -> Unit): Unit +public expect inline fun CharArray.forEachIndexed(action: (index: Int, Char) -> Unit): Unit /** * Returns the largest element or `null` if there are no elements. @@ -5786,7 +5786,7 @@ public header inline fun CharArray.forEachIndexed(action: (index: Int, Char) -> * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Array.max(): Double? +public expect fun Array.max(): Double? /** * Returns the largest element or `null` if there are no elements. @@ -5794,141 +5794,141 @@ public header fun Array.max(): Double? * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Array.max(): Float? +public expect fun Array.max(): Float? /** * Returns the largest element or `null` if there are no elements. */ -public header fun > Array.max(): T? +public expect fun > Array.max(): T? /** * Returns the largest element or `null` if there are no elements. */ -public header fun ByteArray.max(): Byte? +public expect fun ByteArray.max(): Byte? /** * Returns the largest element or `null` if there are no elements. */ -public header fun ShortArray.max(): Short? +public expect fun ShortArray.max(): Short? /** * Returns the largest element or `null` if there are no elements. */ -public header fun IntArray.max(): Int? +public expect fun IntArray.max(): Int? /** * Returns the largest element or `null` if there are no elements. */ -public header fun LongArray.max(): Long? +public expect fun LongArray.max(): Long? /** * Returns the largest element or `null` if there are no elements. * * If any of elements is `NaN` returns `NaN`. */ -public header fun FloatArray.max(): Float? +public expect fun FloatArray.max(): Float? /** * Returns the largest element or `null` if there are no elements. * * If any of elements is `NaN` returns `NaN`. */ -public header fun DoubleArray.max(): Double? +public expect fun DoubleArray.max(): Double? /** * Returns the largest element or `null` if there are no elements. */ -public header fun CharArray.max(): Char? +public expect fun CharArray.max(): Char? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > Array.maxBy(selector: (T) -> R): T? +public expect inline fun > Array.maxBy(selector: (T) -> R): T? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > ByteArray.maxBy(selector: (Byte) -> R): Byte? +public expect inline fun > ByteArray.maxBy(selector: (Byte) -> R): Byte? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > ShortArray.maxBy(selector: (Short) -> R): Short? +public expect inline fun > ShortArray.maxBy(selector: (Short) -> R): Short? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > IntArray.maxBy(selector: (Int) -> R): Int? +public expect inline fun > IntArray.maxBy(selector: (Int) -> R): Int? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > LongArray.maxBy(selector: (Long) -> R): Long? +public expect inline fun > LongArray.maxBy(selector: (Long) -> R): Long? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > FloatArray.maxBy(selector: (Float) -> R): Float? +public expect inline fun > FloatArray.maxBy(selector: (Float) -> R): Float? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > DoubleArray.maxBy(selector: (Double) -> R): Double? +public expect inline fun > DoubleArray.maxBy(selector: (Double) -> R): Double? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > BooleanArray.maxBy(selector: (Boolean) -> R): Boolean? +public expect inline fun > BooleanArray.maxBy(selector: (Boolean) -> R): Boolean? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > CharArray.maxBy(selector: (Char) -> R): Char? +public expect inline fun > CharArray.maxBy(selector: (Char) -> R): Char? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun Array.maxWith(comparator: Comparator): T? +public expect fun Array.maxWith(comparator: Comparator): T? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun ByteArray.maxWith(comparator: Comparator): Byte? +public expect fun ByteArray.maxWith(comparator: Comparator): Byte? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun ShortArray.maxWith(comparator: Comparator): Short? +public expect fun ShortArray.maxWith(comparator: Comparator): Short? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun IntArray.maxWith(comparator: Comparator): Int? +public expect fun IntArray.maxWith(comparator: Comparator): Int? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun LongArray.maxWith(comparator: Comparator): Long? +public expect fun LongArray.maxWith(comparator: Comparator): Long? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun FloatArray.maxWith(comparator: Comparator): Float? +public expect fun FloatArray.maxWith(comparator: Comparator): Float? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun DoubleArray.maxWith(comparator: Comparator): Double? +public expect fun DoubleArray.maxWith(comparator: Comparator): Double? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun BooleanArray.maxWith(comparator: Comparator): Boolean? +public expect fun BooleanArray.maxWith(comparator: Comparator): Boolean? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun CharArray.maxWith(comparator: Comparator): Char? +public expect fun CharArray.maxWith(comparator: Comparator): Char? /** * Returns the smallest element or `null` if there are no elements. @@ -5936,7 +5936,7 @@ public header fun CharArray.maxWith(comparator: Comparator): Char? * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Array.min(): Double? +public expect fun Array.min(): Double? /** * Returns the smallest element or `null` if there are no elements. @@ -5944,276 +5944,276 @@ public header fun Array.min(): Double? * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Array.min(): Float? +public expect fun Array.min(): Float? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun > Array.min(): T? +public expect fun > Array.min(): T? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun ByteArray.min(): Byte? +public expect fun ByteArray.min(): Byte? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun ShortArray.min(): Short? +public expect fun ShortArray.min(): Short? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun IntArray.min(): Int? +public expect fun IntArray.min(): Int? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun LongArray.min(): Long? +public expect fun LongArray.min(): Long? /** * Returns the smallest element or `null` if there are no elements. * * If any of elements is `NaN` returns `NaN`. */ -public header fun FloatArray.min(): Float? +public expect fun FloatArray.min(): Float? /** * Returns the smallest element or `null` if there are no elements. * * If any of elements is `NaN` returns `NaN`. */ -public header fun DoubleArray.min(): Double? +public expect fun DoubleArray.min(): Double? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun CharArray.min(): Char? +public expect fun CharArray.min(): Char? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > Array.minBy(selector: (T) -> R): T? +public expect inline fun > Array.minBy(selector: (T) -> R): T? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > ByteArray.minBy(selector: (Byte) -> R): Byte? +public expect inline fun > ByteArray.minBy(selector: (Byte) -> R): Byte? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > ShortArray.minBy(selector: (Short) -> R): Short? +public expect inline fun > ShortArray.minBy(selector: (Short) -> R): Short? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > IntArray.minBy(selector: (Int) -> R): Int? +public expect inline fun > IntArray.minBy(selector: (Int) -> R): Int? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > LongArray.minBy(selector: (Long) -> R): Long? +public expect inline fun > LongArray.minBy(selector: (Long) -> R): Long? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > FloatArray.minBy(selector: (Float) -> R): Float? +public expect inline fun > FloatArray.minBy(selector: (Float) -> R): Float? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > DoubleArray.minBy(selector: (Double) -> R): Double? +public expect inline fun > DoubleArray.minBy(selector: (Double) -> R): Double? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > BooleanArray.minBy(selector: (Boolean) -> R): Boolean? +public expect inline fun > BooleanArray.minBy(selector: (Boolean) -> R): Boolean? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > CharArray.minBy(selector: (Char) -> R): Char? +public expect inline fun > CharArray.minBy(selector: (Char) -> R): Char? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun Array.minWith(comparator: Comparator): T? +public expect fun Array.minWith(comparator: Comparator): T? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun ByteArray.minWith(comparator: Comparator): Byte? +public expect fun ByteArray.minWith(comparator: Comparator): Byte? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun ShortArray.minWith(comparator: Comparator): Short? +public expect fun ShortArray.minWith(comparator: Comparator): Short? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun IntArray.minWith(comparator: Comparator): Int? +public expect fun IntArray.minWith(comparator: Comparator): Int? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun LongArray.minWith(comparator: Comparator): Long? +public expect fun LongArray.minWith(comparator: Comparator): Long? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun FloatArray.minWith(comparator: Comparator): Float? +public expect fun FloatArray.minWith(comparator: Comparator): Float? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun DoubleArray.minWith(comparator: Comparator): Double? +public expect fun DoubleArray.minWith(comparator: Comparator): Double? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun BooleanArray.minWith(comparator: Comparator): Boolean? +public expect fun BooleanArray.minWith(comparator: Comparator): Boolean? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun CharArray.minWith(comparator: Comparator): Char? +public expect fun CharArray.minWith(comparator: Comparator): Char? /** * Returns `true` if the array has no elements. */ -public header fun Array.none(): Boolean +public expect fun Array.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun ByteArray.none(): Boolean +public expect fun ByteArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun ShortArray.none(): Boolean +public expect fun ShortArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun IntArray.none(): Boolean +public expect fun IntArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun LongArray.none(): Boolean +public expect fun LongArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun FloatArray.none(): Boolean +public expect fun FloatArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun DoubleArray.none(): Boolean +public expect fun DoubleArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun BooleanArray.none(): Boolean +public expect fun BooleanArray.none(): Boolean /** * Returns `true` if the array has no elements. */ -public header fun CharArray.none(): Boolean +public expect fun CharArray.none(): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun Array.none(predicate: (T) -> Boolean): Boolean +public expect inline fun Array.none(predicate: (T) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun ByteArray.none(predicate: (Byte) -> Boolean): Boolean +public expect inline fun ByteArray.none(predicate: (Byte) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun ShortArray.none(predicate: (Short) -> Boolean): Boolean +public expect inline fun ShortArray.none(predicate: (Short) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun IntArray.none(predicate: (Int) -> Boolean): Boolean +public expect inline fun IntArray.none(predicate: (Int) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun LongArray.none(predicate: (Long) -> Boolean): Boolean +public expect inline fun LongArray.none(predicate: (Long) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun FloatArray.none(predicate: (Float) -> Boolean): Boolean +public expect inline fun FloatArray.none(predicate: (Float) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun DoubleArray.none(predicate: (Double) -> Boolean): Boolean +public expect inline fun DoubleArray.none(predicate: (Double) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun BooleanArray.none(predicate: (Boolean) -> Boolean): Boolean +public expect inline fun BooleanArray.none(predicate: (Boolean) -> Boolean): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun CharArray.none(predicate: (Char) -> Boolean): Boolean +public expect 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: (acc: S, T) -> S): S +public expect 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: (acc: Byte, Byte) -> Byte): Byte +public expect 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: (acc: Short, Short) -> Short): Short +public expect 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: (acc: Int, Int) -> Int): Int +public expect 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: (acc: Long, Long) -> Long): Long +public expect 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: (acc: Float, Float) -> Float): Float +public expect 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: (acc: Double, Double) -> Double): Double +public expect 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: (acc: Boolean, Boolean) -> Boolean): Boolean +public expect 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: (acc: Char, Char) -> Char): Char +public expect inline fun CharArray.reduce(operation: (acc: Char, Char) -> Char): Char /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -6221,7 +6221,7 @@ public header inline fun CharArray.reduce(operation: (acc: 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: (index: Int, acc: S, T) -> S): S +public expect 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 @@ -6229,7 +6229,7 @@ public header inline fun Array.reduceIndexed(operation: (index: * @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: (index: Int, acc: Byte, Byte) -> Byte): Byte +public expect 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 @@ -6237,7 +6237,7 @@ public header inline fun ByteArray.reduceIndexed(operation: (index: Int, acc: By * @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: (index: Int, acc: Short, Short) -> Short): Short +public expect 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 @@ -6245,7 +6245,7 @@ public header inline fun ShortArray.reduceIndexed(operation: (index: Int, acc: 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 IntArray.reduceIndexed(operation: (index: Int, acc: Int, Int) -> Int): Int +public expect 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 @@ -6253,7 +6253,7 @@ public header inline fun IntArray.reduceIndexed(operation: (index: Int, acc: 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 LongArray.reduceIndexed(operation: (index: Int, acc: Long, Long) -> Long): Long +public expect 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 @@ -6261,7 +6261,7 @@ public header inline fun LongArray.reduceIndexed(operation: (index: Int, acc: Lo * @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: (index: Int, acc: Float, Float) -> Float): Float +public expect 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 @@ -6269,7 +6269,7 @@ public header inline fun FloatArray.reduceIndexed(operation: (index: Int, acc: F * @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: (index: Int, acc: Double, Double) -> Double): Double +public expect 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 @@ -6277,7 +6277,7 @@ public header inline fun DoubleArray.reduceIndexed(operation: (index: Int, acc: * @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: (index: Int, acc: Boolean, Boolean) -> Boolean): Boolean +public expect 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 @@ -6285,52 +6285,52 @@ public header inline fun BooleanArray.reduceIndexed(operation: (index: Int, acc: * @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: (index: Int, acc: Char, Char) -> Char): Char +public expect 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, acc: S) -> S): S +public expect 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, acc: Byte) -> Byte): Byte +public expect 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, acc: Short) -> Short): Short +public expect 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, acc: Int) -> Int): Int +public expect 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, acc: Long) -> Long): Long +public expect 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, acc: Float) -> Float): Float +public expect 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, acc: Double) -> Double): Double +public expect 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, acc: Boolean) -> Boolean): Boolean +public expect 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, acc: Char) -> Char): Char +public expect inline fun CharArray.reduceRight(operation: (Char, acc: Char) -> Char): Char /** * Accumulates value starting with last element and applying [operation] from right to left @@ -6338,7 +6338,7 @@ public header inline fun CharArray.reduceRight(operation: (Char, acc: Char) -> C * @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: (index: Int, T, acc: S) -> S): S +public expect 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 @@ -6346,7 +6346,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: (index: Int, Byte, acc: Byte) -> Byte): Byte +public expect 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 @@ -6354,7 +6354,7 @@ public header inline fun ByteArray.reduceRightIndexed(operation: (index: 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 header inline fun ShortArray.reduceRightIndexed(operation: (index: Int, Short, acc: Short) -> Short): Short +public expect 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 @@ -6362,7 +6362,7 @@ public header inline fun ShortArray.reduceRightIndexed(operation: (index: 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 header inline fun IntArray.reduceRightIndexed(operation: (index: Int, Int, acc: Int) -> Int): Int +public expect 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 @@ -6370,7 +6370,7 @@ public header inline fun IntArray.reduceRightIndexed(operation: (index: 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: (index: Int, Long, acc: Long) -> Long): Long +public expect 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 @@ -6378,7 +6378,7 @@ public header inline fun LongArray.reduceRightIndexed(operation: (index: 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 header inline fun FloatArray.reduceRightIndexed(operation: (index: Int, Float, acc: Float) -> Float): Float +public expect 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 @@ -6386,7 +6386,7 @@ public header inline fun FloatArray.reduceRightIndexed(operation: (index: 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 header inline fun DoubleArray.reduceRightIndexed(operation: (index: Int, Double, acc: Double) -> Double): Double +public expect 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 @@ -6394,7 +6394,7 @@ public header inline fun DoubleArray.reduceRightIndexed(operation: (index: 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 BooleanArray.reduceRightIndexed(operation: (index: Int, Boolean, acc: Boolean) -> Boolean): Boolean +public expect 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 @@ -6402,425 +6402,425 @@ public header inline fun BooleanArray.reduceRightIndexed(operation: (index: 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 CharArray.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char +public expect 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. */ -public header inline fun Array.sumBy(selector: (T) -> Int): Int +public expect inline fun Array.sumBy(selector: (T) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int +public expect inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun ShortArray.sumBy(selector: (Short) -> Int): Int +public expect inline fun ShortArray.sumBy(selector: (Short) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun IntArray.sumBy(selector: (Int) -> Int): Int +public expect inline fun IntArray.sumBy(selector: (Int) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun LongArray.sumBy(selector: (Long) -> Int): Int +public expect inline fun LongArray.sumBy(selector: (Long) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun FloatArray.sumBy(selector: (Float) -> Int): Int +public expect inline fun FloatArray.sumBy(selector: (Float) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun DoubleArray.sumBy(selector: (Double) -> Int): Int +public expect inline fun DoubleArray.sumBy(selector: (Double) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun BooleanArray.sumBy(selector: (Boolean) -> Int): Int +public expect inline fun BooleanArray.sumBy(selector: (Boolean) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun CharArray.sumBy(selector: (Char) -> Int): Int +public expect inline fun CharArray.sumBy(selector: (Char) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun Array.sumByDouble(selector: (T) -> Double): Double +public expect inline fun Array.sumByDouble(selector: (T) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun ByteArray.sumByDouble(selector: (Byte) -> Double): Double +public expect inline fun ByteArray.sumByDouble(selector: (Byte) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun ShortArray.sumByDouble(selector: (Short) -> Double): Double +public expect inline fun ShortArray.sumByDouble(selector: (Short) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun IntArray.sumByDouble(selector: (Int) -> Double): Double +public expect inline fun IntArray.sumByDouble(selector: (Int) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun LongArray.sumByDouble(selector: (Long) -> Double): Double +public expect inline fun LongArray.sumByDouble(selector: (Long) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun FloatArray.sumByDouble(selector: (Float) -> Double): Double +public expect inline fun FloatArray.sumByDouble(selector: (Float) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun DoubleArray.sumByDouble(selector: (Double) -> Double): Double +public expect inline fun DoubleArray.sumByDouble(selector: (Double) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun BooleanArray.sumByDouble(selector: (Boolean) -> Double): Double +public expect inline fun BooleanArray.sumByDouble(selector: (Boolean) -> Double): Double /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ -public header inline fun CharArray.sumByDouble(selector: (Char) -> Double): Double +public expect inline fun CharArray.sumByDouble(selector: (Char) -> Double): Double /** * Returns an original collection containing all the non-`null` elements, throwing an [IllegalArgumentException] if there are any `null` elements. */ -public header fun Array.requireNoNulls(): Array +public expect fun Array.requireNoNulls(): Array /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun Array.partition(predicate: (T) -> Boolean): Pair, List> +public expect inline fun Array.partition(predicate: (T) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun ByteArray.partition(predicate: (Byte) -> Boolean): Pair, List> +public expect inline fun ByteArray.partition(predicate: (Byte) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun ShortArray.partition(predicate: (Short) -> Boolean): Pair, List> +public expect inline fun ShortArray.partition(predicate: (Short) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun IntArray.partition(predicate: (Int) -> Boolean): Pair, List> +public expect inline fun IntArray.partition(predicate: (Int) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun LongArray.partition(predicate: (Long) -> Boolean): Pair, List> +public expect inline fun LongArray.partition(predicate: (Long) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun FloatArray.partition(predicate: (Float) -> Boolean): Pair, List> +public expect inline fun FloatArray.partition(predicate: (Float) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun DoubleArray.partition(predicate: (Double) -> Boolean): Pair, List> +public expect inline fun DoubleArray.partition(predicate: (Double) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun BooleanArray.partition(predicate: (Boolean) -> Boolean): Pair, List> +public expect inline fun BooleanArray.partition(predicate: (Boolean) -> Boolean): Pair, List> /** * Splits the original array into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun CharArray.partition(predicate: (Char) -> Boolean): Pair, List> +public expect inline fun CharArray.partition(predicate: (Char) -> Boolean): Pair, List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun Array.zip(other: Array): List> +public expect infix fun Array.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun ByteArray.zip(other: Array): List> +public expect infix fun ByteArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun ShortArray.zip(other: Array): List> +public expect infix fun ShortArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun IntArray.zip(other: Array): List> +public expect infix fun IntArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun LongArray.zip(other: Array): List> +public expect infix fun LongArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun FloatArray.zip(other: Array): List> +public expect infix fun FloatArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun DoubleArray.zip(other: Array): List> +public expect infix fun DoubleArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun BooleanArray.zip(other: Array): List> +public expect infix fun BooleanArray.zip(other: Array): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun CharArray.zip(other: Array): List> +public expect 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 header inline fun Array.zip(other: Array, transform: (a: T, b: R) -> V): List +public expect 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: (a: Byte, b: R) -> V): List +public expect 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: (a: Short, b: R) -> V): List +public expect 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: (a: Int, b: R) -> V): List +public expect 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: (a: Long, b: R) -> V): List +public expect 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: (a: Float, b: R) -> V): List +public expect 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: (a: Double, b: R) -> V): List +public expect 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: (a: Boolean, b: R) -> V): List +public expect 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: (a: Char, b: R) -> V): List +public expect 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. */ -public header infix fun Array.zip(other: Iterable): List> +public expect infix fun Array.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun ByteArray.zip(other: Iterable): List> +public expect infix fun ByteArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun ShortArray.zip(other: Iterable): List> +public expect infix fun ShortArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun IntArray.zip(other: Iterable): List> +public expect infix fun IntArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun LongArray.zip(other: Iterable): List> +public expect infix fun LongArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun FloatArray.zip(other: Iterable): List> +public expect infix fun FloatArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun DoubleArray.zip(other: Iterable): List> +public expect infix fun DoubleArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun BooleanArray.zip(other: Iterable): List> +public expect infix fun BooleanArray.zip(other: Iterable): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun CharArray.zip(other: Iterable): List> +public expect 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 header inline fun Array.zip(other: Iterable, transform: (a: T, b: R) -> V): List +public expect 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: (a: Byte, b: R) -> V): List +public expect 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: (a: Short, b: R) -> V): List +public expect 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: (a: Int, b: R) -> V): List +public expect 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: (a: Long, b: R) -> V): List +public expect 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: (a: Float, b: R) -> V): List +public expect 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: (a: Double, b: R) -> V): List +public expect 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: (a: Boolean, b: R) -> V): List +public expect 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: (a: Char, b: R) -> V): List +public expect 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. */ -public header infix fun ByteArray.zip(other: ByteArray): List> +public expect infix fun ByteArray.zip(other: ByteArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun ShortArray.zip(other: ShortArray): List> +public expect infix fun ShortArray.zip(other: ShortArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun IntArray.zip(other: IntArray): List> +public expect infix fun IntArray.zip(other: IntArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun LongArray.zip(other: LongArray): List> +public expect infix fun LongArray.zip(other: LongArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun FloatArray.zip(other: FloatArray): List> +public expect infix fun FloatArray.zip(other: FloatArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun DoubleArray.zip(other: DoubleArray): List> +public expect infix fun DoubleArray.zip(other: DoubleArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun BooleanArray.zip(other: BooleanArray): List> +public expect infix fun BooleanArray.zip(other: BooleanArray): List> /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun CharArray.zip(other: CharArray): List> +public expect 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: (a: Byte, b: Byte) -> V): List +public expect 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: (a: Short, b: Short) -> V): List +public expect 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: (a: Int, b: Int) -> V): List +public expect 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: (a: Long, b: Long) -> V): List +public expect 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: (a: Float, b: Float) -> V): List +public expect 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: (a: Double, b: Double) -> V): List +public expect 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: (a: Boolean, b: Boolean) -> V): List +public expect 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: (a: Char, b: Char) -> V): List +public expect 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. @@ -7119,645 +7119,645 @@ public fun CharArray.joinToString(separator: CharSequence = ", ", prefix: CharSe /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun Array.asIterable(): Iterable +public expect fun Array.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun ByteArray.asIterable(): Iterable +public expect fun ByteArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun ShortArray.asIterable(): Iterable +public expect fun ShortArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun IntArray.asIterable(): Iterable +public expect fun IntArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun LongArray.asIterable(): Iterable +public expect fun LongArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun FloatArray.asIterable(): Iterable +public expect fun FloatArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun DoubleArray.asIterable(): Iterable +public expect fun DoubleArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun BooleanArray.asIterable(): Iterable +public expect fun BooleanArray.asIterable(): Iterable /** * Creates an [Iterable] instance that wraps the original array returning its elements when being iterated. */ -public header fun CharArray.asIterable(): Iterable +public expect fun CharArray.asIterable(): Iterable /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun Array.asSequence(): Sequence +public expect fun Array.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun ByteArray.asSequence(): Sequence +public expect fun ByteArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun ShortArray.asSequence(): Sequence +public expect fun ShortArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun IntArray.asSequence(): Sequence +public expect fun IntArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun LongArray.asSequence(): Sequence +public expect fun LongArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun FloatArray.asSequence(): Sequence +public expect fun FloatArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun DoubleArray.asSequence(): Sequence +public expect fun DoubleArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun BooleanArray.asSequence(): Sequence +public expect fun BooleanArray.asSequence(): Sequence /** * Creates a [Sequence] instance that wraps the original array returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromArray */ -public header fun CharArray.asSequence(): Sequence +public expect fun CharArray.asSequence(): Sequence /** * Returns an average value of elements in the array. */ @kotlin.jvm.JvmName("averageOfByte") -public header fun Array.average(): Double +public expect fun Array.average(): Double /** * Returns an average value of elements in the array. */ @kotlin.jvm.JvmName("averageOfShort") -public header fun Array.average(): Double +public expect fun Array.average(): Double /** * Returns an average value of elements in the array. */ @kotlin.jvm.JvmName("averageOfInt") -public header fun Array.average(): Double +public expect fun Array.average(): Double /** * Returns an average value of elements in the array. */ @kotlin.jvm.JvmName("averageOfLong") -public header fun Array.average(): Double +public expect fun Array.average(): Double /** * Returns an average value of elements in the array. */ @kotlin.jvm.JvmName("averageOfFloat") -public header fun Array.average(): Double +public expect fun Array.average(): Double /** * Returns an average value of elements in the array. */ @kotlin.jvm.JvmName("averageOfDouble") -public header fun Array.average(): Double +public expect fun Array.average(): Double /** * Returns an average value of elements in the array. */ -public header fun ByteArray.average(): Double +public expect fun ByteArray.average(): Double /** * Returns an average value of elements in the array. */ -public header fun ShortArray.average(): Double +public expect fun ShortArray.average(): Double /** * Returns an average value of elements in the array. */ -public header fun IntArray.average(): Double +public expect fun IntArray.average(): Double /** * Returns an average value of elements in the array. */ -public header fun LongArray.average(): Double +public expect fun LongArray.average(): Double /** * Returns an average value of elements in the array. */ -public header fun FloatArray.average(): Double +public expect fun FloatArray.average(): Double /** * Returns an average value of elements in the array. */ -public header fun DoubleArray.average(): Double +public expect fun DoubleArray.average(): Double /** * Returns the sum of all elements in the array. */ @kotlin.jvm.JvmName("sumOfByte") -public header fun Array.sum(): Int +public expect fun Array.sum(): Int /** * Returns the sum of all elements in the array. */ @kotlin.jvm.JvmName("sumOfShort") -public header fun Array.sum(): Int +public expect fun Array.sum(): Int /** * Returns the sum of all elements in the array. */ @kotlin.jvm.JvmName("sumOfInt") -public header fun Array.sum(): Int +public expect fun Array.sum(): Int /** * Returns the sum of all elements in the array. */ @kotlin.jvm.JvmName("sumOfLong") -public header fun Array.sum(): Long +public expect fun Array.sum(): Long /** * Returns the sum of all elements in the array. */ @kotlin.jvm.JvmName("sumOfFloat") -public header fun Array.sum(): Float +public expect fun Array.sum(): Float /** * Returns the sum of all elements in the array. */ @kotlin.jvm.JvmName("sumOfDouble") -public header fun Array.sum(): Double +public expect fun Array.sum(): Double /** * Returns the sum of all elements in the array. */ -public header fun ByteArray.sum(): Int +public expect fun ByteArray.sum(): Int /** * Returns the sum of all elements in the array. */ -public header fun ShortArray.sum(): Int +public expect fun ShortArray.sum(): Int /** * Returns the sum of all elements in the array. */ -public header fun IntArray.sum(): Int +public expect fun IntArray.sum(): Int /** * Returns the sum of all elements in the array. */ -public header fun LongArray.sum(): Long +public expect fun LongArray.sum(): Long /** * Returns the sum of all elements in the array. */ -public header fun FloatArray.sum(): Float +public expect fun FloatArray.sum(): Float /** * Returns the sum of all elements in the array. */ -public header fun DoubleArray.sum(): Double +public expect fun DoubleArray.sum(): Double /** * Returns a [List] that wraps the original array. */ -public header fun Array.asList(): List +public expect fun Array.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun ByteArray.asList(): List +public expect fun ByteArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun ShortArray.asList(): List +public expect fun ShortArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun IntArray.asList(): List +public expect fun IntArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun LongArray.asList(): List +public expect fun LongArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun FloatArray.asList(): List +public expect fun FloatArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun DoubleArray.asList(): List +public expect fun DoubleArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun BooleanArray.asList(): List +public expect fun BooleanArray.asList(): List /** * Returns a [List] that wraps the original array. */ -public header fun CharArray.asList(): List +public expect fun CharArray.asList(): List /** * Returns new array which is a copy of the original array. */ -public header fun Array.copyOf(): Array +public expect fun Array.copyOf(): Array /** * Returns new array which is a copy of the original array. */ -public header fun ByteArray.copyOf(): ByteArray +public expect fun ByteArray.copyOf(): ByteArray /** * Returns new array which is a copy of the original array. */ -public header fun ShortArray.copyOf(): ShortArray +public expect fun ShortArray.copyOf(): ShortArray /** * Returns new array which is a copy of the original array. */ -public header fun IntArray.copyOf(): IntArray +public expect fun IntArray.copyOf(): IntArray /** * Returns new array which is a copy of the original array. */ -public header fun LongArray.copyOf(): LongArray +public expect fun LongArray.copyOf(): LongArray /** * Returns new array which is a copy of the original array. */ -public header fun FloatArray.copyOf(): FloatArray +public expect fun FloatArray.copyOf(): FloatArray /** * Returns new array which is a copy of the original array. */ -public header fun DoubleArray.copyOf(): DoubleArray +public expect fun DoubleArray.copyOf(): DoubleArray /** * Returns new array which is a copy of the original array. */ -public header fun BooleanArray.copyOf(): BooleanArray +public expect fun BooleanArray.copyOf(): BooleanArray /** * Returns new array which is a copy of the original array. */ -public header fun CharArray.copyOf(): CharArray +public expect fun CharArray.copyOf(): CharArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun ByteArray.copyOf(newSize: Int): ByteArray +public expect fun ByteArray.copyOf(newSize: Int): ByteArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun ShortArray.copyOf(newSize: Int): ShortArray +public expect fun ShortArray.copyOf(newSize: Int): ShortArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun IntArray.copyOf(newSize: Int): IntArray +public expect fun IntArray.copyOf(newSize: Int): IntArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun LongArray.copyOf(newSize: Int): LongArray +public expect fun LongArray.copyOf(newSize: Int): LongArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun FloatArray.copyOf(newSize: Int): FloatArray +public expect fun FloatArray.copyOf(newSize: Int): FloatArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun DoubleArray.copyOf(newSize: Int): DoubleArray +public expect fun DoubleArray.copyOf(newSize: Int): DoubleArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun BooleanArray.copyOf(newSize: Int): BooleanArray +public expect fun BooleanArray.copyOf(newSize: Int): BooleanArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun CharArray.copyOf(newSize: Int): CharArray +public expect fun CharArray.copyOf(newSize: Int): CharArray /** * Returns new array which is a copy of the original array, resized to the given [newSize]. */ -public header fun Array.copyOf(newSize: Int): Array +public expect fun Array.copyOf(newSize: Int): Array /** * Returns new array which is a copy of range of original array. */ -public header fun Array.copyOfRange(fromIndex: Int, toIndex: Int): Array +public expect fun Array.copyOfRange(fromIndex: Int, toIndex: Int): Array /** * Returns new array which is a copy of range of original array. */ -public header fun ByteArray.copyOfRange(fromIndex: Int, toIndex: Int): ByteArray +public expect fun ByteArray.copyOfRange(fromIndex: Int, toIndex: Int): ByteArray /** * Returns new array which is a copy of range of original array. */ -public header fun ShortArray.copyOfRange(fromIndex: Int, toIndex: Int): ShortArray +public expect fun ShortArray.copyOfRange(fromIndex: Int, toIndex: Int): ShortArray /** * Returns new array which is a copy of range of original array. */ -public header fun IntArray.copyOfRange(fromIndex: Int, toIndex: Int): IntArray +public expect fun IntArray.copyOfRange(fromIndex: Int, toIndex: Int): IntArray /** * Returns new array which is a copy of range of original array. */ -public header fun LongArray.copyOfRange(fromIndex: Int, toIndex: Int): LongArray +public expect fun LongArray.copyOfRange(fromIndex: Int, toIndex: Int): LongArray /** * Returns new array which is a copy of range of original array. */ -public header fun FloatArray.copyOfRange(fromIndex: Int, toIndex: Int): FloatArray +public expect fun FloatArray.copyOfRange(fromIndex: Int, toIndex: Int): FloatArray /** * Returns new array which is a copy of range of original array. */ -public header fun DoubleArray.copyOfRange(fromIndex: Int, toIndex: Int): DoubleArray +public expect fun DoubleArray.copyOfRange(fromIndex: Int, toIndex: Int): DoubleArray /** * Returns new array which is a copy of range of original array. */ -public header fun BooleanArray.copyOfRange(fromIndex: Int, toIndex: Int): BooleanArray +public expect fun BooleanArray.copyOfRange(fromIndex: Int, toIndex: Int): BooleanArray /** * Returns new array which is a copy of range of original array. */ -public header fun CharArray.copyOfRange(fromIndex: Int, toIndex: Int): CharArray +public expect fun CharArray.copyOfRange(fromIndex: Int, toIndex: Int): CharArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun Array.plus(element: T): Array +public expect operator fun Array.plus(element: T): Array /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun ByteArray.plus(element: Byte): ByteArray +public expect operator fun ByteArray.plus(element: Byte): ByteArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun ShortArray.plus(element: Short): ShortArray +public expect operator fun ShortArray.plus(element: Short): ShortArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun IntArray.plus(element: Int): IntArray +public expect operator fun IntArray.plus(element: Int): IntArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun LongArray.plus(element: Long): LongArray +public expect operator fun LongArray.plus(element: Long): LongArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun FloatArray.plus(element: Float): FloatArray +public expect operator fun FloatArray.plus(element: Float): FloatArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun DoubleArray.plus(element: Double): DoubleArray +public expect operator fun DoubleArray.plus(element: Double): DoubleArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun BooleanArray.plus(element: Boolean): BooleanArray +public expect operator fun BooleanArray.plus(element: Boolean): BooleanArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header operator fun CharArray.plus(element: Char): CharArray +public expect operator fun CharArray.plus(element: Char): CharArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun Array.plus(elements: Collection): Array +public expect operator fun Array.plus(elements: Collection): Array /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun ByteArray.plus(elements: Collection): ByteArray +public expect operator fun ByteArray.plus(elements: Collection): ByteArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun ShortArray.plus(elements: Collection): ShortArray +public expect operator fun ShortArray.plus(elements: Collection): ShortArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun IntArray.plus(elements: Collection): IntArray +public expect operator fun IntArray.plus(elements: Collection): IntArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun LongArray.plus(elements: Collection): LongArray +public expect operator fun LongArray.plus(elements: Collection): LongArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun FloatArray.plus(elements: Collection): FloatArray +public expect operator fun FloatArray.plus(elements: Collection): FloatArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun DoubleArray.plus(elements: Collection): DoubleArray +public expect operator fun DoubleArray.plus(elements: Collection): DoubleArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun BooleanArray.plus(elements: Collection): BooleanArray +public expect operator fun BooleanArray.plus(elements: Collection): BooleanArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] collection. */ -public header operator fun CharArray.plus(elements: Collection): CharArray +public expect operator fun CharArray.plus(elements: Collection): CharArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun Array.plus(elements: Array): Array +public expect operator fun Array.plus(elements: Array): Array /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun ByteArray.plus(elements: ByteArray): ByteArray +public expect operator fun ByteArray.plus(elements: ByteArray): ByteArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun ShortArray.plus(elements: ShortArray): ShortArray +public expect operator fun ShortArray.plus(elements: ShortArray): ShortArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun IntArray.plus(elements: IntArray): IntArray +public expect operator fun IntArray.plus(elements: IntArray): IntArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun LongArray.plus(elements: LongArray): LongArray +public expect operator fun LongArray.plus(elements: LongArray): LongArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun FloatArray.plus(elements: FloatArray): FloatArray +public expect operator fun FloatArray.plus(elements: FloatArray): FloatArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun DoubleArray.plus(elements: DoubleArray): DoubleArray +public expect operator fun DoubleArray.plus(elements: DoubleArray): DoubleArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun BooleanArray.plus(elements: BooleanArray): BooleanArray +public expect operator fun BooleanArray.plus(elements: BooleanArray): BooleanArray /** * Returns an array containing all elements of the original array and then all elements of the given [elements] array. */ -public header operator fun CharArray.plus(elements: CharArray): CharArray +public expect operator fun CharArray.plus(elements: CharArray): CharArray /** * Returns an array containing all elements of the original array and then the given [element]. */ -public header fun Array.plusElement(element: T): Array +public expect fun Array.plusElement(element: T): Array /** * Sorts the array in-place. */ -public header fun IntArray.sort(): Unit +public expect fun IntArray.sort(): Unit /** * Sorts the array in-place. */ -public header fun LongArray.sort(): Unit +public expect fun LongArray.sort(): Unit /** * Sorts the array in-place. */ -public header fun ByteArray.sort(): Unit +public expect fun ByteArray.sort(): Unit /** * Sorts the array in-place. */ -public header fun ShortArray.sort(): Unit +public expect fun ShortArray.sort(): Unit /** * Sorts the array in-place. */ -public header fun DoubleArray.sort(): Unit +public expect fun DoubleArray.sort(): Unit /** * Sorts the array in-place. */ -public header fun FloatArray.sort(): Unit +public expect fun FloatArray.sort(): Unit /** * Sorts the array in-place. */ -public header fun CharArray.sort(): Unit +public expect fun CharArray.sort(): Unit /** * Sorts the array in-place according to the natural order of its elements. */ -public header fun > Array.sort(): Unit +public expect fun > Array.sort(): Unit /** * Sorts the array in-place according to the order specified by the given [comparator]. */ -public header fun Array.sortWith(comparator: Comparator): Unit +public expect fun Array.sortWith(comparator: Comparator): Unit /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun ByteArray.toTypedArray(): Array +public expect fun ByteArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun ShortArray.toTypedArray(): Array +public expect fun ShortArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun IntArray.toTypedArray(): Array +public expect fun IntArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun LongArray.toTypedArray(): Array +public expect fun LongArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun FloatArray.toTypedArray(): Array +public expect fun FloatArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun DoubleArray.toTypedArray(): Array +public expect fun DoubleArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun BooleanArray.toTypedArray(): Array +public expect fun BooleanArray.toTypedArray(): Array /** * Returns a *typed* object array containing all of the elements of this primitive array. */ -public header fun CharArray.toTypedArray(): Array +public expect fun CharArray.toTypedArray(): Array diff --git a/libraries/stdlib/common/src/generated/_Collections.kt b/libraries/stdlib/common/src/generated/_Collections.kt index 9db5bfa1e0a..e974fb76822 100644 --- a/libraries/stdlib/common/src/generated/_Collections.kt +++ b/libraries/stdlib/common/src/generated/_Collections.kt @@ -14,441 +14,441 @@ import kotlin.comparisons.* * Returns 1st *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun List.component1(): T +public expect inline operator fun List.component1(): T /** * Returns 2nd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun List.component2(): T +public expect inline operator fun List.component2(): T /** * Returns 3rd *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun List.component3(): T +public expect inline operator fun List.component3(): T /** * Returns 4th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun List.component4(): T +public expect inline operator fun List.component4(): T /** * Returns 5th *element* from the collection. */ @kotlin.internal.InlineOnly -public header inline operator fun List.component5(): T +public expect inline operator fun List.component5(): T /** * Returns `true` if [element] is found in the collection. */ -public header operator fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains(element: T): Boolean +public expect operator fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains(element: T): Boolean /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this collection. */ -public header fun Iterable.elementAt(index: Int): T +public expect fun Iterable.elementAt(index: Int): T /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this list. */ @kotlin.internal.InlineOnly -public header inline fun List.elementAt(index: Int): T +public expect inline fun List.elementAt(index: Int): T /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this collection. */ -public header fun Iterable.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T +public expect fun Iterable.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this list. */ @kotlin.internal.InlineOnly -public header inline fun List.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T +public expect inline fun List.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this collection. */ -public header fun Iterable.elementAtOrNull(index: Int): T? +public expect fun Iterable.elementAtOrNull(index: Int): T? /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this list. */ @kotlin.internal.InlineOnly -public header inline fun List.elementAtOrNull(index: Int): T? +public expect inline fun List.elementAtOrNull(index: Int): T? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun Iterable.find(predicate: (T) -> Boolean): T? +public expect inline fun Iterable.find(predicate: (T) -> Boolean): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun Iterable.findLast(predicate: (T) -> Boolean): T? +public expect inline fun Iterable.findLast(predicate: (T) -> Boolean): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ @kotlin.internal.InlineOnly -public header inline fun List.findLast(predicate: (T) -> Boolean): T? +public expect inline fun List.findLast(predicate: (T) -> Boolean): T? /** * Returns first element. * @throws [NoSuchElementException] if the collection is empty. */ -public header fun Iterable.first(): T +public expect fun Iterable.first(): T /** * Returns first element. * @throws [NoSuchElementException] if the list is empty. */ -public header fun List.first(): T +public expect fun List.first(): T /** * Returns the first element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun Iterable.first(predicate: (T) -> Boolean): T +public expect inline fun Iterable.first(predicate: (T) -> Boolean): T /** * Returns the first element, or `null` if the collection is empty. */ -public header fun Iterable.firstOrNull(): T? +public expect fun Iterable.firstOrNull(): T? /** * Returns the first element, or `null` if the list is empty. */ -public header fun List.firstOrNull(): T? +public expect fun List.firstOrNull(): T? /** * Returns the first element matching the given [predicate], or `null` if element was not found. */ -public header inline fun Iterable.firstOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Iterable.firstOrNull(predicate: (T) -> Boolean): T? /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this list. */ @kotlin.internal.InlineOnly -public header inline fun List.getOrElse(index: Int, defaultValue: (Int) -> T): T +public expect inline fun List.getOrElse(index: Int, defaultValue: (Int) -> T): T /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this list. */ -public header fun List.getOrNull(index: Int): T? +public expect fun List.getOrNull(index: Int): T? /** * Returns first index of [element], or -1 if the collection does not contain element. */ -public header fun <@kotlin.internal.OnlyInputTypes T> Iterable.indexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> Iterable.indexOf(element: T): Int /** * Returns first index of [element], or -1 if the list does not contain element. */ @Suppress("EXTENSION_SHADOWED_BY_MEMBER") // false warning, extension takes precedence in some cases -public header fun <@kotlin.internal.OnlyInputTypes T> List.indexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> List.indexOf(element: T): Int /** * Returns index of the first element matching the given [predicate], or -1 if the collection does not contain such element. */ -public header inline fun Iterable.indexOfFirst(predicate: (T) -> Boolean): Int +public expect inline fun Iterable.indexOfFirst(predicate: (T) -> Boolean): Int /** * Returns index of the first element matching the given [predicate], or -1 if the list does not contain such element. */ -public header inline fun List.indexOfFirst(predicate: (T) -> Boolean): Int +public expect inline fun List.indexOfFirst(predicate: (T) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the collection does not contain such element. */ -public header inline fun Iterable.indexOfLast(predicate: (T) -> Boolean): Int +public expect inline fun Iterable.indexOfLast(predicate: (T) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the list does not contain such element. */ -public header inline fun List.indexOfLast(predicate: (T) -> Boolean): Int +public expect inline fun List.indexOfLast(predicate: (T) -> Boolean): Int /** * Returns the last element. * @throws [NoSuchElementException] if the collection is empty. */ -public header fun Iterable.last(): T +public expect fun Iterable.last(): T /** * Returns the last element. * @throws [NoSuchElementException] if the list is empty. */ -public header fun List.last(): T +public expect fun List.last(): T /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun Iterable.last(predicate: (T) -> Boolean): T +public expect inline fun Iterable.last(predicate: (T) -> Boolean): T /** * Returns the last element matching the given [predicate]. * @throws [NoSuchElementException] if no such element is found. */ -public header inline fun List.last(predicate: (T) -> Boolean): T +public expect inline fun List.last(predicate: (T) -> Boolean): T /** * Returns last index of [element], or -1 if the collection does not contain element. */ -public header fun <@kotlin.internal.OnlyInputTypes T> Iterable.lastIndexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> Iterable.lastIndexOf(element: T): Int /** * Returns last index of [element], or -1 if the list does not contain element. */ @Suppress("EXTENSION_SHADOWED_BY_MEMBER") // false warning, extension takes precedence in some cases -public header fun <@kotlin.internal.OnlyInputTypes T> List.lastIndexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> List.lastIndexOf(element: T): Int /** * Returns the last element, or `null` if the collection is empty. */ -public header fun Iterable.lastOrNull(): T? +public expect fun Iterable.lastOrNull(): T? /** * Returns the last element, or `null` if the list is empty. */ -public header fun List.lastOrNull(): T? +public expect fun List.lastOrNull(): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun Iterable.lastOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Iterable.lastOrNull(predicate: (T) -> Boolean): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. */ -public header inline fun List.lastOrNull(predicate: (T) -> Boolean): T? +public expect inline fun List.lastOrNull(predicate: (T) -> Boolean): T? /** * Returns the single element, or throws an exception if the collection is empty or has more than one element. */ -public header fun Iterable.single(): T +public expect fun Iterable.single(): T /** * Returns the single element, or throws an exception if the list is empty or has more than one element. */ -public header fun List.single(): T +public expect fun List.single(): T /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. */ -public header inline fun Iterable.single(predicate: (T) -> Boolean): T +public expect inline fun Iterable.single(predicate: (T) -> Boolean): T /** * Returns single element, or `null` if the collection is empty or has more than one element. */ -public header fun Iterable.singleOrNull(): T? +public expect fun Iterable.singleOrNull(): T? /** * Returns single element, or `null` if the list is empty or has more than one element. */ -public header fun List.singleOrNull(): T? +public expect fun List.singleOrNull(): T? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. */ -public header inline fun Iterable.singleOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Iterable.singleOrNull(predicate: (T) -> Boolean): T? /** * Returns a list containing all elements except first [n] elements. */ -public header fun Iterable.drop(n: Int): List +public expect fun Iterable.drop(n: Int): List /** * Returns a list containing all elements except last [n] elements. */ -public header fun List.dropLast(n: Int): List +public expect fun List.dropLast(n: Int): List /** * Returns a list containing all elements except last elements that satisfy the given [predicate]. */ -public header inline fun List.dropLastWhile(predicate: (T) -> Boolean): List +public expect inline fun List.dropLastWhile(predicate: (T) -> Boolean): List /** * Returns a list containing all elements except first elements that satisfy the given [predicate]. */ -public header inline fun Iterable.dropWhile(predicate: (T) -> Boolean): List +public expect inline fun Iterable.dropWhile(predicate: (T) -> Boolean): List /** * Returns a list containing only elements matching the given [predicate]. */ -public header inline fun Iterable.filter(predicate: (T) -> Boolean): List +public expect inline fun Iterable.filter(predicate: (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 Iterable.filterIndexed(predicate: (index: Int, T) -> Boolean): List +public expect 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: (index: Int, T) -> Boolean): C +public expect 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. */ -public header inline fun Iterable<*>.filterIsInstance(): List<@kotlin.internal.NoInfer R> +public expect inline fun Iterable<*>.filterIsInstance(): List<@kotlin.internal.NoInfer R> /** * Appends all elements that are instances of specified type parameter R to the given [destination]. */ -public header inline fun > Iterable<*>.filterIsInstanceTo(destination: C): C +public expect inline fun > Iterable<*>.filterIsInstanceTo(destination: C): C /** * Returns a list containing all elements not matching the given [predicate]. */ -public header inline fun Iterable.filterNot(predicate: (T) -> Boolean): List +public expect inline fun Iterable.filterNot(predicate: (T) -> Boolean): List /** * Returns a list containing all elements that are not `null`. */ -public header fun Iterable.filterNotNull(): List +public expect fun Iterable.filterNotNull(): List /** * Appends all elements that are not `null` to the given [destination]. */ -public header fun , T : Any> Iterable.filterNotNullTo(destination: C): C +public expect fun , T : Any> Iterable.filterNotNullTo(destination: C): C /** * Appends all elements not matching the given [predicate] to the given [destination]. */ -public header inline fun > Iterable.filterNotTo(destination: C, predicate: (T) -> Boolean): C +public expect inline fun > Iterable.filterNotTo(destination: C, predicate: (T) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. */ -public header inline fun > Iterable.filterTo(destination: C, predicate: (T) -> Boolean): C +public expect inline fun > Iterable.filterTo(destination: C, predicate: (T) -> Boolean): C /** * Returns a list containing elements at indices in the specified [indices] range. */ -public header fun List.slice(indices: IntRange): List +public expect fun List.slice(indices: IntRange): List /** * Returns a list containing elements at specified [indices]. */ -public header fun List.slice(indices: Iterable): List +public expect fun List.slice(indices: Iterable): List /** * Returns a list containing first [n] elements. */ -public header fun Iterable.take(n: Int): List +public expect fun Iterable.take(n: Int): List /** * Returns a list containing last [n] elements. */ -public header fun List.takeLast(n: Int): List +public expect fun List.takeLast(n: Int): List /** * Returns a list containing last elements satisfying the given [predicate]. */ -public header inline fun List.takeLastWhile(predicate: (T) -> Boolean): List +public expect inline fun List.takeLastWhile(predicate: (T) -> Boolean): List /** * Returns a list containing first elements satisfying the given [predicate]. */ -public header inline fun Iterable.takeWhile(predicate: (T) -> Boolean): List +public expect inline fun Iterable.takeWhile(predicate: (T) -> Boolean): List /** * Reverses elements in the list in-place. */ -public header fun MutableList.reverse(): Unit +public expect fun MutableList.reverse(): Unit /** * Returns a list with elements in reversed order. */ -public header fun Iterable.reversed(): List +public expect fun Iterable.reversed(): List /** * Sorts elements in the list in-place according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > MutableList.sortBy(crossinline selector: (T) -> R?): Unit +public expect inline fun > MutableList.sortBy(crossinline selector: (T) -> R?): Unit /** * Sorts elements in the list in-place descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > MutableList.sortByDescending(crossinline selector: (T) -> R?): Unit +public expect inline fun > MutableList.sortByDescending(crossinline selector: (T) -> R?): Unit /** * Sorts elements in the list in-place descending according to their natural sort order. */ -public header fun > MutableList.sortDescending(): Unit +public expect fun > MutableList.sortDescending(): Unit /** * Returns a list of all elements sorted according to their natural sort order. */ -public header fun > Iterable.sorted(): List +public expect fun > Iterable.sorted(): List /** * Returns a list of all elements sorted according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > Iterable.sortedBy(crossinline selector: (T) -> R?): List +public expect inline fun > Iterable.sortedBy(crossinline selector: (T) -> R?): List /** * Returns a list of all elements sorted descending according to natural sort order of the value returned by specified [selector] function. */ -public header inline fun > Iterable.sortedByDescending(crossinline selector: (T) -> R?): List +public expect inline fun > Iterable.sortedByDescending(crossinline selector: (T) -> R?): List /** * Returns a list of all elements sorted descending according to their natural sort order. */ -public header fun > Iterable.sortedDescending(): List +public expect fun > Iterable.sortedDescending(): List /** * Returns a list of all elements sorted according to the specified [comparator]. */ -public header fun Iterable.sortedWith(comparator: Comparator): List +public expect fun Iterable.sortedWith(comparator: Comparator): List /** * Returns an array of Boolean containing all of the elements of this collection. */ -public header fun Collection.toBooleanArray(): BooleanArray +public expect fun Collection.toBooleanArray(): BooleanArray /** * Returns an array of Byte containing all of the elements of this collection. */ -public header fun Collection.toByteArray(): ByteArray +public expect fun Collection.toByteArray(): ByteArray /** * Returns an array of Char containing all of the elements of this collection. */ -public header fun Collection.toCharArray(): CharArray +public expect fun Collection.toCharArray(): CharArray /** * Returns an array of Double containing all of the elements of this collection. */ -public header fun Collection.toDoubleArray(): DoubleArray +public expect fun Collection.toDoubleArray(): DoubleArray /** * Returns an array of Float containing all of the elements of this collection. */ -public header fun Collection.toFloatArray(): FloatArray +public expect fun Collection.toFloatArray(): FloatArray /** * Returns an array of Int containing all of the elements of this collection. */ -public header fun Collection.toIntArray(): IntArray +public expect fun Collection.toIntArray(): IntArray /** * Returns an array of Long containing all of the elements of this collection. */ -public header fun Collection.toLongArray(): LongArray +public expect fun Collection.toLongArray(): LongArray /** * Returns an array of Short containing all of the elements of this collection. */ -public header fun Collection.toShortArray(): ShortArray +public expect fun Collection.toShortArray(): ShortArray /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -458,7 +458,7 @@ public header fun Collection.toShortArray(): ShortArray * * The returned map preserves the entry iteration order of the original collection. */ -public header inline fun Iterable.associate(transform: (T) -> Pair): Map +public expect inline fun Iterable.associate(transform: (T) -> Pair): Map /** * Returns a [Map] containing the elements from the given collection indexed by the key @@ -468,7 +468,7 @@ public header inline fun Iterable.associate(transform: (T) -> Pair< * * The returned map preserves the entry iteration order of the original collection. */ -public header inline fun Iterable.associateBy(keySelector: (T) -> K): Map +public expect inline fun Iterable.associateBy(keySelector: (T) -> K): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given collection. @@ -477,7 +477,7 @@ public header inline fun Iterable.associateBy(keySelector: (T) -> K): * * The returned map preserves the entry iteration order of the original collection. */ -public header inline fun Iterable.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map +public expect inline fun Iterable.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -486,7 +486,7 @@ public header inline fun Iterable.associateBy(keySelector: (T) -> K * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > Iterable.associateByTo(destination: M, keySelector: (T) -> K): M +public expect inline fun > Iterable.associateByTo(destination: M, keySelector: (T) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -495,7 +495,7 @@ public header inline fun > Iterable.associat * * If any two elements would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > Iterable.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M +public expect inline fun > Iterable.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -503,49 +503,49 @@ public header inline fun > Iterable.assoc * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > Iterable.associateTo(destination: M, transform: (T) -> Pair): M +public expect inline fun > Iterable.associateTo(destination: M, transform: (T) -> Pair): M /** * Appends all elements to the given [destination] collection. */ -public header fun > Iterable.toCollection(destination: C): C +public expect fun > Iterable.toCollection(destination: C): C /** * Returns a [HashSet] of all elements. */ -public header fun Iterable.toHashSet(): HashSet +public expect fun Iterable.toHashSet(): HashSet /** * Returns a [List] containing all elements. */ -public header fun Iterable.toList(): List +public expect fun Iterable.toList(): List /** * Returns a [MutableList] filled with all elements of this collection. */ -public header fun Iterable.toMutableList(): MutableList +public expect fun Iterable.toMutableList(): MutableList /** * Returns a [MutableList] filled with all elements of this collection. */ -public header fun Collection.toMutableList(): MutableList +public expect fun Collection.toMutableList(): MutableList /** * Returns a [Set] of all elements. * * The returned set preserves the element iteration order of the original collection. */ -public header fun Iterable.toSet(): Set +public expect fun Iterable.toSet(): Set /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each element of original collection. */ -public header inline fun Iterable.flatMap(transform: (T) -> Iterable): List +public expect inline fun Iterable.flatMap(transform: (T) -> Iterable): List /** * Appends all elements yielded from results of [transform] function being invoked on each element of original collection, to the given [destination]. */ -public header inline fun > Iterable.flatMapTo(destination: C, transform: (T) -> Iterable): C +public expect inline fun > Iterable.flatMapTo(destination: C, transform: (T) -> Iterable): C /** * Groups elements of the original collection by the key returned by the given [keySelector] function @@ -555,7 +555,7 @@ public header inline fun > Iterable.flatMap * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun Iterable.groupBy(keySelector: (T) -> K): Map> +public expect inline fun Iterable.groupBy(keySelector: (T) -> K): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original collection @@ -566,7 +566,7 @@ public header inline fun Iterable.groupBy(keySelector: (T) -> K): Map< * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun Iterable.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> +public expect inline fun Iterable.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> /** * Groups elements of the original collection by the key returned by the given [keySelector] function @@ -576,7 +576,7 @@ public header inline fun Iterable.groupBy(keySelector: (T) -> K, va * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> Iterable.groupByTo(destination: M, keySelector: (T) -> K): M +public expect inline fun >> Iterable.groupByTo(destination: M, keySelector: (T) -> K): M /** * Groups values returned by the [valueTransform] function applied to each element of the original collection @@ -587,7 +587,7 @@ public header inline fun >> Iterable>> Iterable.groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M +public expect inline fun >> Iterable.groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M /** * Creates a [Grouping] source from a collection to be used later with one of group-and-fold operations @@ -596,13 +596,13 @@ public header inline fun >> Iterabl * @sample samples.collections.Collections.Transformations.groupingByEachCount */ @SinceKotlin("1.1") -public header inline fun Iterable.groupingBy(crossinline keySelector: (T) -> K): Grouping +public expect inline fun Iterable.groupingBy(crossinline keySelector: (T) -> K): Grouping /** * Returns a list containing the results of applying the given [transform] function * to each element in the original collection. */ -public header inline fun Iterable.map(transform: (T) -> R): List +public expect inline fun Iterable.map(transform: (T) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -610,7 +610,7 @@ public header inline fun Iterable.map(transform: (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 header inline fun Iterable.mapIndexed(transform: (index: Int, T) -> R): List +public expect 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 @@ -618,7 +618,7 @@ public header inline fun Iterable.mapIndexed(transform: (index: 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 Iterable.mapIndexedNotNull(transform: (index: Int, T) -> R?): List +public expect 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 @@ -626,7 +626,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: (index: Int, T) -> R?): C +public expect 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 @@ -634,37 +634,37 @@ 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: (index: Int, T) -> R): C +public expect 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 * to each element in the original collection. */ -public header inline fun Iterable.mapNotNull(transform: (T) -> R?): List +public expect inline fun Iterable.mapNotNull(transform: (T) -> R?): List /** * Applies the given [transform] function to each element in the original collection * and appends only the non-null results to the given [destination]. */ -public header inline fun > Iterable.mapNotNullTo(destination: C, transform: (T) -> R?): C +public expect inline fun > Iterable.mapNotNullTo(destination: C, transform: (T) -> R?): C /** * Applies the given [transform] function to each element of the original collection * and appends the results to the given [destination]. */ -public header inline fun > Iterable.mapTo(destination: C, transform: (T) -> R): C +public expect inline fun > Iterable.mapTo(destination: C, transform: (T) -> R): C /** * Returns a lazy [Iterable] of [IndexedValue] for each element of the original collection. */ -public header fun Iterable.withIndex(): Iterable> +public expect fun Iterable.withIndex(): Iterable> /** * Returns a list containing only distinct elements from the given collection. * * The elements in the resulting list are in the same order as they were in the source collection. */ -public header fun Iterable.distinct(): List +public expect fun Iterable.distinct(): List /** * Returns a list containing only elements from the given collection @@ -672,28 +672,28 @@ public header fun Iterable.distinct(): List * * The elements in the resulting list are in the same order as they were in the source collection. */ -public header inline fun Iterable.distinctBy(selector: (T) -> K): List +public expect inline fun Iterable.distinctBy(selector: (T) -> K): List /** * Returns a set containing all elements that are contained by both this set and the specified collection. * * The returned set preserves the element iteration order of the original collection. */ -public header infix fun Iterable.intersect(other: Iterable): Set +public expect infix fun Iterable.intersect(other: Iterable): Set /** * Returns a set containing all elements that are contained by this collection and not contained by the specified collection. * * The returned set preserves the element iteration order of the original collection. */ -public header infix fun Iterable.subtract(other: Iterable): Set +public expect infix fun Iterable.subtract(other: Iterable): Set /** * Returns a mutable set containing all distinct elements from the given collection. * * The returned set preserves the element iteration order of the original collection. */ -public header fun Iterable.toMutableSet(): MutableSet +public expect fun Iterable.toMutableSet(): MutableSet /** * Returns a set containing all distinct elements from both collections. @@ -702,43 +702,43 @@ public header fun Iterable.toMutableSet(): MutableSet * Those elements of the [other] collection that are unique are iterated in the end * in the order of the [other] collection. */ -public header infix fun Iterable.union(other: Iterable): Set +public expect infix fun Iterable.union(other: Iterable): Set /** * Returns `true` if all elements match the given [predicate]. */ -public header inline fun Iterable.all(predicate: (T) -> Boolean): Boolean +public expect inline fun Iterable.all(predicate: (T) -> Boolean): Boolean /** * Returns `true` if collection has at least one element. */ -public header fun Iterable.any(): Boolean +public expect fun Iterable.any(): Boolean /** * Returns `true` if at least one element matches the given [predicate]. */ -public header inline fun Iterable.any(predicate: (T) -> Boolean): Boolean +public expect inline fun Iterable.any(predicate: (T) -> Boolean): Boolean /** * Returns the number of elements in this collection. */ -public header fun Iterable.count(): Int +public expect fun Iterable.count(): Int /** * Returns the number of elements in this collection. */ @kotlin.internal.InlineOnly -public header inline fun Collection.count(): Int +public expect inline fun Collection.count(): Int /** * Returns the number of elements matching the given [predicate]. */ -public header inline fun Iterable.count(predicate: (T) -> Boolean): Int +public expect 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: (acc: R, T) -> R): R +public expect 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 @@ -746,12 +746,12 @@ public header inline fun Iterable.fold(initial: R, operation: (acc: 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 Iterable.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R +public expect 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, acc: R) -> R): R +public expect 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 @@ -759,20 +759,20 @@ public header inline fun List.foldRight(initial: R, operation: (T, acc * @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: (index: Int, T, acc: R) -> R): R +public expect inline fun List.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R /** * Performs the given [action] on each element. */ @kotlin.internal.HidesMembers -public header inline fun Iterable.forEach(action: (T) -> Unit): Unit +public expect inline fun Iterable.forEach(action: (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 Iterable.forEachIndexed(action: (index: Int, T) -> Unit): Unit +public expect inline fun Iterable.forEachIndexed(action: (index: Int, T) -> Unit): Unit /** * Returns the largest element or `null` if there are no elements. @@ -780,7 +780,7 @@ public header inline fun Iterable.forEachIndexed(action: (index: Int, T) * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Iterable.max(): Double? +public expect fun Iterable.max(): Double? /** * Returns the largest element or `null` if there are no elements. @@ -788,22 +788,22 @@ public header fun Iterable.max(): Double? * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Iterable.max(): Float? +public expect fun Iterable.max(): Float? /** * Returns the largest element or `null` if there are no elements. */ -public header fun > Iterable.max(): T? +public expect fun > Iterable.max(): T? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. */ -public header inline fun > Iterable.maxBy(selector: (T) -> R): T? +public expect inline fun > Iterable.maxBy(selector: (T) -> R): T? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun Iterable.maxWith(comparator: Comparator): T? +public expect fun Iterable.maxWith(comparator: Comparator): T? /** * Returns the smallest element or `null` if there are no elements. @@ -811,7 +811,7 @@ public header fun Iterable.maxWith(comparator: Comparator): T? * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Iterable.min(): Double? +public expect fun Iterable.min(): Double? /** * Returns the smallest element or `null` if there are no elements. @@ -819,43 +819,43 @@ public header fun Iterable.min(): Double? * If any of elements is `NaN` returns `NaN`. */ @SinceKotlin("1.1") -public header fun Iterable.min(): Float? +public expect fun Iterable.min(): Float? /** * Returns the smallest element or `null` if there are no elements. */ -public header fun > Iterable.min(): T? +public expect fun > Iterable.min(): T? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. */ -public header inline fun > Iterable.minBy(selector: (T) -> R): T? +public expect inline fun > Iterable.minBy(selector: (T) -> R): T? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. */ -public header fun Iterable.minWith(comparator: Comparator): T? +public expect fun Iterable.minWith(comparator: Comparator): T? /** * Returns `true` if the collection has no elements. */ -public header fun Iterable.none(): Boolean +public expect fun Iterable.none(): Boolean /** * Returns `true` if no elements match the given [predicate]. */ -public header inline fun Iterable.none(predicate: (T) -> Boolean): Boolean +public expect inline fun Iterable.none(predicate: (T) -> Boolean): Boolean /** * Performs the given [action] on each element and returns the collection itself afterwards. */ @SinceKotlin("1.1") -public header inline fun > C.onEach(action: (T) -> Unit): C +public expect 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: (acc: S, T) -> S): S +public expect inline fun Iterable.reduce(operation: (acc: S, T) -> S): S /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -863,12 +863,12 @@ public header inline fun Iterable.reduce(operation: (acc: 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 header inline fun Iterable.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S +public expect 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, acc: S) -> S): S +public expect inline fun List.reduceRight(operation: (T, acc: S) -> S): S /** * Accumulates value starting with last element and applying [operation] from right to left @@ -876,132 +876,132 @@ public header inline fun List.reduceRight(operation: (T, acc: 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: (index: Int, T, acc: S) -> S): S +public expect 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. */ -public header inline fun Iterable.sumBy(selector: (T) -> Int): Int +public expect inline fun Iterable.sumBy(selector: (T) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the collection. */ -public header inline fun Iterable.sumByDouble(selector: (T) -> Double): Double +public expect inline fun Iterable.sumByDouble(selector: (T) -> Double): Double /** * Returns an original collection containing all the non-`null` elements, throwing an [IllegalArgumentException] if there are any `null` elements. */ -public header fun Iterable.requireNoNulls(): Iterable +public expect fun Iterable.requireNoNulls(): Iterable /** * Returns an original collection containing all the non-`null` elements, throwing an [IllegalArgumentException] if there are any `null` elements. */ -public header fun List.requireNoNulls(): List +public expect fun List.requireNoNulls(): List /** * Returns a list containing all elements of the original collection without the first occurrence of the given [element]. */ -public header operator fun Iterable.minus(element: T): List +public expect operator fun Iterable.minus(element: T): List /** * Returns a list containing all elements of the original collection except the elements contained in the given [elements] array. */ -public header operator fun Iterable.minus(elements: Array): List +public expect operator fun Iterable.minus(elements: Array): List /** * Returns a list containing all elements of the original collection except the elements contained in the given [elements] collection. */ -public header operator fun Iterable.minus(elements: Iterable): List +public expect operator fun Iterable.minus(elements: Iterable): List /** * Returns a list containing all elements of the original collection except the elements contained in the given [elements] sequence. */ -public header operator fun Iterable.minus(elements: Sequence): List +public expect operator fun Iterable.minus(elements: Sequence): List /** * Returns a list containing all elements of the original collection without the first occurrence of the given [element]. */ @kotlin.internal.InlineOnly -public header inline fun Iterable.minusElement(element: T): List +public expect inline fun Iterable.minusElement(element: T): List /** * Splits the original collection into pair of lists, * where *first* list contains elements for which [predicate] yielded `true`, * while *second* list contains elements for which [predicate] yielded `false`. */ -public header inline fun Iterable.partition(predicate: (T) -> Boolean): Pair, List> +public expect inline fun Iterable.partition(predicate: (T) -> Boolean): Pair, List> /** * Returns a list containing all elements of the original collection and then the given [element]. */ -public header operator fun Iterable.plus(element: T): List +public expect operator fun Iterable.plus(element: T): List /** * Returns a list containing all elements of the original collection and then the given [element]. */ -public header operator fun Collection.plus(element: T): List +public expect operator fun Collection.plus(element: T): List /** * Returns a list containing all elements of the original collection and then all elements of the given [elements] array. */ -public header operator fun Iterable.plus(elements: Array): List +public expect operator fun Iterable.plus(elements: Array): List /** * Returns a list containing all elements of the original collection and then all elements of the given [elements] array. */ -public header operator fun Collection.plus(elements: Array): List +public expect operator fun Collection.plus(elements: Array): List /** * Returns a list containing all elements of the original collection and then all elements of the given [elements] collection. */ -public header operator fun Iterable.plus(elements: Iterable): List +public expect operator fun Iterable.plus(elements: Iterable): List /** * Returns a list containing all elements of the original collection and then all elements of the given [elements] collection. */ -public header operator fun Collection.plus(elements: Iterable): List +public expect operator fun Collection.plus(elements: Iterable): List /** * Returns a list containing all elements of the original collection and then all elements of the given [elements] sequence. */ -public header operator fun Iterable.plus(elements: Sequence): List +public expect operator fun Iterable.plus(elements: Sequence): List /** * Returns a list containing all elements of the original collection and then all elements of the given [elements] sequence. */ -public header operator fun Collection.plus(elements: Sequence): List +public expect operator fun Collection.plus(elements: Sequence): List /** * Returns a list containing all elements of the original collection and then the given [element]. */ @kotlin.internal.InlineOnly -public header inline fun Iterable.plusElement(element: T): List +public expect inline fun Iterable.plusElement(element: T): List /** * Returns a list containing all elements of the original collection and then the given [element]. */ @kotlin.internal.InlineOnly -public header inline fun Collection.plusElement(element: T): List +public expect inline fun Collection.plusElement(element: T): List /** * Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection. */ -public header infix fun Iterable.zip(other: Array): List> +public expect 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 header inline fun Iterable.zip(other: Array, transform: (a: T, b: R) -> V): List +public expect 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. */ -public header infix fun Iterable.zip(other: Iterable): List> +public expect 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 header inline fun Iterable.zip(other: Iterable, transform: (a: T, b: R) -> V): List +public expect 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. @@ -1037,84 +1037,84 @@ public fun Iterable.joinToString(separator: CharSequence = ", ", prefix: * Returns this collection as an [Iterable]. */ @kotlin.internal.InlineOnly -public header inline fun Iterable.asIterable(): Iterable +public expect inline fun Iterable.asIterable(): Iterable /** * Creates a [Sequence] instance that wraps the original collection returning its elements when being iterated. * * @sample samples.collections.Sequences.Building.sequenceFromCollection */ -public header fun Iterable.asSequence(): Sequence +public expect fun Iterable.asSequence(): Sequence /** * Returns an average value of elements in the collection. */ @kotlin.jvm.JvmName("averageOfByte") -public header fun Iterable.average(): Double +public expect fun Iterable.average(): Double /** * Returns an average value of elements in the collection. */ @kotlin.jvm.JvmName("averageOfShort") -public header fun Iterable.average(): Double +public expect fun Iterable.average(): Double /** * Returns an average value of elements in the collection. */ @kotlin.jvm.JvmName("averageOfInt") -public header fun Iterable.average(): Double +public expect fun Iterable.average(): Double /** * Returns an average value of elements in the collection. */ @kotlin.jvm.JvmName("averageOfLong") -public header fun Iterable.average(): Double +public expect fun Iterable.average(): Double /** * Returns an average value of elements in the collection. */ @kotlin.jvm.JvmName("averageOfFloat") -public header fun Iterable.average(): Double +public expect fun Iterable.average(): Double /** * Returns an average value of elements in the collection. */ @kotlin.jvm.JvmName("averageOfDouble") -public header fun Iterable.average(): Double +public expect fun Iterable.average(): Double /** * Returns the sum of all elements in the collection. */ @kotlin.jvm.JvmName("sumOfByte") -public header fun Iterable.sum(): Int +public expect fun Iterable.sum(): Int /** * Returns the sum of all elements in the collection. */ @kotlin.jvm.JvmName("sumOfShort") -public header fun Iterable.sum(): Int +public expect fun Iterable.sum(): Int /** * Returns the sum of all elements in the collection. */ @kotlin.jvm.JvmName("sumOfInt") -public header fun Iterable.sum(): Int +public expect fun Iterable.sum(): Int /** * Returns the sum of all elements in the collection. */ @kotlin.jvm.JvmName("sumOfLong") -public header fun Iterable.sum(): Long +public expect fun Iterable.sum(): Long /** * Returns the sum of all elements in the collection. */ @kotlin.jvm.JvmName("sumOfFloat") -public header fun Iterable.sum(): Float +public expect fun Iterable.sum(): Float /** * Returns the sum of all elements in the collection. */ @kotlin.jvm.JvmName("sumOfDouble") -public header fun Iterable.sum(): Double +public expect fun Iterable.sum(): Double diff --git a/libraries/stdlib/common/src/generated/_Comparisons.kt b/libraries/stdlib/common/src/generated/_Comparisons.kt index 9e0f9c1e352..866d48ede12 100644 --- a/libraries/stdlib/common/src/generated/_Comparisons.kt +++ b/libraries/stdlib/common/src/generated/_Comparisons.kt @@ -15,218 +15,218 @@ import kotlin.comparisons.* * If values are equal, returns the first one. */ @SinceKotlin("1.1") -public header fun > maxOf(a: T, b: T): T +public expect fun > maxOf(a: T, b: T): T /** * Returns the greater of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Byte, b: Byte): Byte +public expect inline fun maxOf(a: Byte, b: Byte): Byte /** * Returns the greater of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Short, b: Short): Short +public expect inline fun maxOf(a: Short, b: Short): Short /** * Returns the greater of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Int, b: Int): Int +public expect inline fun maxOf(a: Int, b: Int): Int /** * Returns the greater of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Long, b: Long): Long +public expect inline fun maxOf(a: Long, b: Long): Long /** * Returns the greater of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Float, b: Float): Float +public expect inline fun maxOf(a: Float, b: Float): Float /** * Returns the greater of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Double, b: Double): Double +public expect inline fun maxOf(a: Double, b: Double): Double /** * Returns the greater of three values. */ @SinceKotlin("1.1") -public header fun > maxOf(a: T, b: T, c: T): T +public expect fun > maxOf(a: T, b: T, c: T): T /** * Returns the greater of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Byte, b: Byte, c: Byte): Byte +public expect inline fun maxOf(a: Byte, b: Byte, c: Byte): Byte /** * Returns the greater of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Short, b: Short, c: Short): Short +public expect inline fun maxOf(a: Short, b: Short, c: Short): Short /** * Returns the greater of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Int, b: Int, c: Int): Int +public expect inline fun maxOf(a: Int, b: Int, c: Int): Int /** * Returns the greater of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Long, b: Long, c: Long): Long +public expect inline fun maxOf(a: Long, b: Long, c: Long): Long /** * Returns the greater of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Float, b: Float, c: Float): Float +public expect inline fun maxOf(a: Float, b: Float, c: Float): Float /** * Returns the greater of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun maxOf(a: Double, b: Double, c: Double): Double +public expect inline fun maxOf(a: Double, b: Double, c: Double): Double /** * Returns the greater of three values according to the order specified by the given [comparator]. */ @SinceKotlin("1.1") -public header fun maxOf(a: T, b: T, c: T, comparator: Comparator): T +public expect fun maxOf(a: T, b: T, c: T, comparator: Comparator): T /** * Returns the greater of two values according to the order specified by the given [comparator]. * If values are equal, returns the first one. */ @SinceKotlin("1.1") -public header fun maxOf(a: T, b: T, comparator: Comparator): T +public expect fun maxOf(a: T, b: T, comparator: Comparator): T /** * Returns the smaller of two values. * If values are equal, returns the first one. */ @SinceKotlin("1.1") -public header fun > minOf(a: T, b: T): T +public expect fun > minOf(a: T, b: T): T /** * Returns the smaller of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Byte, b: Byte): Byte +public expect inline fun minOf(a: Byte, b: Byte): Byte /** * Returns the smaller of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Short, b: Short): Short +public expect inline fun minOf(a: Short, b: Short): Short /** * Returns the smaller of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Int, b: Int): Int +public expect inline fun minOf(a: Int, b: Int): Int /** * Returns the smaller of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Long, b: Long): Long +public expect inline fun minOf(a: Long, b: Long): Long /** * Returns the smaller of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Float, b: Float): Float +public expect inline fun minOf(a: Float, b: Float): Float /** * Returns the smaller of two values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Double, b: Double): Double +public expect inline fun minOf(a: Double, b: Double): Double /** * Returns the smaller of three values. */ @SinceKotlin("1.1") -public header fun > minOf(a: T, b: T, c: T): T +public expect fun > minOf(a: T, b: T, c: T): T /** * Returns the smaller of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Byte, b: Byte, c: Byte): Byte +public expect inline fun minOf(a: Byte, b: Byte, c: Byte): Byte /** * Returns the smaller of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Short, b: Short, c: Short): Short +public expect inline fun minOf(a: Short, b: Short, c: Short): Short /** * Returns the smaller of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Int, b: Int, c: Int): Int +public expect inline fun minOf(a: Int, b: Int, c: Int): Int /** * Returns the smaller of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Long, b: Long, c: Long): Long +public expect inline fun minOf(a: Long, b: Long, c: Long): Long /** * Returns the smaller of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Float, b: Float, c: Float): Float +public expect inline fun minOf(a: Float, b: Float, c: Float): Float /** * Returns the smaller of three values. */ @SinceKotlin("1.1") @kotlin.internal.InlineOnly -public header inline fun minOf(a: Double, b: Double, c: Double): Double +public expect inline fun minOf(a: Double, b: Double, c: Double): Double /** * Returns the smaller of three values according to the order specified by the given [comparator]. */ @SinceKotlin("1.1") -public header fun minOf(a: T, b: T, c: T, comparator: Comparator): T +public expect fun minOf(a: T, b: T, c: T, comparator: Comparator): T /** * Returns the smaller of two values according to the order specified by the given [comparator]. * If values are equal, returns the first one. */ @SinceKotlin("1.1") -public header fun minOf(a: T, b: T, comparator: Comparator): T +public expect fun minOf(a: T, b: T, comparator: Comparator): T diff --git a/libraries/stdlib/common/src/generated/_Maps.kt b/libraries/stdlib/common/src/generated/_Maps.kt index 9bb0917a0be..abbd4592c4f 100644 --- a/libraries/stdlib/common/src/generated/_Maps.kt +++ b/libraries/stdlib/common/src/generated/_Maps.kt @@ -13,120 +13,120 @@ import kotlin.comparisons.* /** * Returns a [List] containing all key-value pairs. */ -public header fun Map.toList(): List> +public expect fun Map.toList(): List> /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each entry of original map. */ -public header inline fun Map.flatMap(transform: (Map.Entry) -> Iterable): List +public expect inline fun Map.flatMap(transform: (Map.Entry) -> Iterable): List /** * Appends all elements yielded from results of [transform] function being invoked on each entry of original map, to the given [destination]. */ -public header inline fun > Map.flatMapTo(destination: C, transform: (Map.Entry) -> Iterable): C +public expect inline fun > Map.flatMapTo(destination: C, transform: (Map.Entry) -> Iterable): C /** * Returns a list containing the results of applying the given [transform] function * to each entry in the original map. */ -public header inline fun Map.map(transform: (Map.Entry) -> R): List +public expect inline fun Map.map(transform: (Map.Entry) -> R): List /** * Returns a list containing only the non-null results of applying the given [transform] function * to each entry in the original map. */ -public header inline fun Map.mapNotNull(transform: (Map.Entry) -> R?): List +public expect inline fun Map.mapNotNull(transform: (Map.Entry) -> R?): List /** * Applies the given [transform] function to each entry in the original map * and appends only the non-null results to the given [destination]. */ -public header inline fun > Map.mapNotNullTo(destination: C, transform: (Map.Entry) -> R?): C +public expect inline fun > Map.mapNotNullTo(destination: C, transform: (Map.Entry) -> R?): C /** * Applies the given [transform] function to each entry of the original map * and appends the results to the given [destination]. */ -public header inline fun > Map.mapTo(destination: C, transform: (Map.Entry) -> R): C +public expect inline fun > Map.mapTo(destination: C, transform: (Map.Entry) -> R): C /** * Returns `true` if all entries match the given [predicate]. */ -public header inline fun Map.all(predicate: (Map.Entry) -> Boolean): Boolean +public expect inline fun Map.all(predicate: (Map.Entry) -> Boolean): Boolean /** * Returns `true` if map has at least one entry. */ -public header fun Map.any(): Boolean +public expect fun Map.any(): Boolean /** * Returns `true` if at least one entry matches the given [predicate]. */ -public header inline fun Map.any(predicate: (Map.Entry) -> Boolean): Boolean +public expect inline fun Map.any(predicate: (Map.Entry) -> Boolean): Boolean /** * Returns the number of entries in this map. */ @kotlin.internal.InlineOnly -public header inline fun Map.count(): Int +public expect inline fun Map.count(): Int /** * Returns the number of entries matching the given [predicate]. */ -public header inline fun Map.count(predicate: (Map.Entry) -> Boolean): Int +public expect inline fun Map.count(predicate: (Map.Entry) -> Boolean): Int /** * Performs the given [action] on each entry. */ @kotlin.internal.HidesMembers -public header inline fun Map.forEach(action: (Map.Entry) -> Unit): Unit +public expect inline fun Map.forEach(action: (Map.Entry) -> Unit): Unit /** * Returns the first entry yielding the largest value of the given function or `null` if there are no entries. */ @kotlin.internal.InlineOnly -public header inline fun > Map.maxBy(selector: (Map.Entry) -> R): Map.Entry? +public expect inline fun > Map.maxBy(selector: (Map.Entry) -> R): Map.Entry? /** * Returns the first entry having the largest value according to the provided [comparator] or `null` if there are no entries. */ @kotlin.internal.InlineOnly -public header inline fun Map.maxWith(comparator: Comparator>): Map.Entry? +public expect inline fun Map.maxWith(comparator: Comparator>): Map.Entry? /** * Returns the first entry yielding the smallest value of the given function or `null` if there are no entries. */ -public header inline fun > Map.minBy(selector: (Map.Entry) -> R): Map.Entry? +public expect inline fun > Map.minBy(selector: (Map.Entry) -> R): Map.Entry? /** * Returns the first entry having the smallest value according to the provided [comparator] or `null` if there are no entries. */ -public header fun Map.minWith(comparator: Comparator>): Map.Entry? +public expect fun Map.minWith(comparator: Comparator>): Map.Entry? /** * Returns `true` if the map has no entries. */ -public header fun Map.none(): Boolean +public expect fun Map.none(): Boolean /** * Returns `true` if no entries match the given [predicate]. */ -public header inline fun Map.none(predicate: (Map.Entry) -> Boolean): Boolean +public expect inline fun Map.none(predicate: (Map.Entry) -> Boolean): Boolean /** * Performs the given [action] on each entry and returns the map itself afterwards. */ @SinceKotlin("1.1") -public header inline fun > M.onEach(action: (Map.Entry) -> Unit): M +public expect inline fun > M.onEach(action: (Map.Entry) -> Unit): M /** * Creates an [Iterable] instance that wraps the original map returning its entries when being iterated. */ @kotlin.internal.InlineOnly -public header inline fun Map.asIterable(): Iterable> +public expect inline fun Map.asIterable(): Iterable> /** * Creates a [Sequence] instance that wraps the original map returning its entries when being iterated. */ -public header fun Map.asSequence(): Sequence> +public expect fun Map.asSequence(): Sequence> diff --git a/libraries/stdlib/common/src/generated/_Ranges.kt b/libraries/stdlib/common/src/generated/_Ranges.kt index d685e0fc0d6..4e2b45a9e4a 100644 --- a/libraries/stdlib/common/src/generated/_Ranges.kt +++ b/libraries/stdlib/common/src/generated/_Ranges.kt @@ -14,606 +14,606 @@ import kotlin.comparisons.* * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -public header operator fun ClosedRange.contains(value: Byte): Boolean +public expect operator fun ClosedRange.contains(value: Byte): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -public header operator fun ClosedRange.contains(value: Byte): Boolean +public expect operator fun ClosedRange.contains(value: Byte): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -public header operator fun ClosedRange.contains(value: Byte): Boolean +public expect operator fun ClosedRange.contains(value: Byte): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("doubleRangeContains") -public header operator fun ClosedRange.contains(value: Byte): Boolean +public expect operator fun ClosedRange.contains(value: Byte): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("floatRangeContains") -public header operator fun ClosedRange.contains(value: Byte): Boolean +public expect operator fun ClosedRange.contains(value: Byte): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -public header operator fun ClosedRange.contains(value: Double): Boolean +public expect operator fun ClosedRange.contains(value: Double): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -public header operator fun ClosedRange.contains(value: Double): Boolean +public expect operator fun ClosedRange.contains(value: Double): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -public header operator fun ClosedRange.contains(value: Double): Boolean +public expect operator fun ClosedRange.contains(value: Double): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -public header operator fun ClosedRange.contains(value: Double): Boolean +public expect operator fun ClosedRange.contains(value: Double): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("floatRangeContains") -public header operator fun ClosedRange.contains(value: Double): Boolean +public expect operator fun ClosedRange.contains(value: Double): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -public header operator fun ClosedRange.contains(value: Float): Boolean +public expect operator fun ClosedRange.contains(value: Float): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -public header operator fun ClosedRange.contains(value: Float): Boolean +public expect operator fun ClosedRange.contains(value: Float): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -public header operator fun ClosedRange.contains(value: Float): Boolean +public expect operator fun ClosedRange.contains(value: Float): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -public header operator fun ClosedRange.contains(value: Float): Boolean +public expect operator fun ClosedRange.contains(value: Float): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("doubleRangeContains") -public header operator fun ClosedRange.contains(value: Float): Boolean +public expect operator fun ClosedRange.contains(value: Float): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -public header operator fun ClosedRange.contains(value: Int): Boolean +public expect operator fun ClosedRange.contains(value: Int): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -public header operator fun ClosedRange.contains(value: Int): Boolean +public expect operator fun ClosedRange.contains(value: Int): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -public header operator fun ClosedRange.contains(value: Int): Boolean +public expect operator fun ClosedRange.contains(value: Int): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("doubleRangeContains") -public header operator fun ClosedRange.contains(value: Int): Boolean +public expect operator fun ClosedRange.contains(value: Int): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("floatRangeContains") -public header operator fun ClosedRange.contains(value: Int): Boolean +public expect operator fun ClosedRange.contains(value: Int): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -public header operator fun ClosedRange.contains(value: Long): Boolean +public expect operator fun ClosedRange.contains(value: Long): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -public header operator fun ClosedRange.contains(value: Long): Boolean +public expect operator fun ClosedRange.contains(value: Long): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("shortRangeContains") -public header operator fun ClosedRange.contains(value: Long): Boolean +public expect operator fun ClosedRange.contains(value: Long): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("doubleRangeContains") -public header operator fun ClosedRange.contains(value: Long): Boolean +public expect operator fun ClosedRange.contains(value: Long): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("floatRangeContains") -public header operator fun ClosedRange.contains(value: Long): Boolean +public expect operator fun ClosedRange.contains(value: Long): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("intRangeContains") -public header operator fun ClosedRange.contains(value: Short): Boolean +public expect operator fun ClosedRange.contains(value: Short): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("longRangeContains") -public header operator fun ClosedRange.contains(value: Short): Boolean +public expect operator fun ClosedRange.contains(value: Short): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("byteRangeContains") -public header operator fun ClosedRange.contains(value: Short): Boolean +public expect operator fun ClosedRange.contains(value: Short): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("doubleRangeContains") -public header operator fun ClosedRange.contains(value: Short): Boolean +public expect operator fun ClosedRange.contains(value: Short): Boolean /** * Checks if the specified [value] belongs to this range. */ @kotlin.jvm.JvmName("floatRangeContains") -public header operator fun ClosedRange.contains(value: Short): Boolean +public expect operator fun ClosedRange.contains(value: Short): Boolean /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Int.downTo(to: Byte): IntProgression +public expect infix fun Int.downTo(to: Byte): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Long.downTo(to: Byte): LongProgression +public expect infix fun Long.downTo(to: Byte): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Byte.downTo(to: Byte): IntProgression +public expect infix fun Byte.downTo(to: Byte): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Short.downTo(to: Byte): IntProgression +public expect infix fun Short.downTo(to: Byte): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Char.downTo(to: Char): CharProgression +public expect infix fun Char.downTo(to: Char): CharProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Int.downTo(to: Int): IntProgression +public expect infix fun Int.downTo(to: Int): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Long.downTo(to: Int): LongProgression +public expect infix fun Long.downTo(to: Int): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Byte.downTo(to: Int): IntProgression +public expect infix fun Byte.downTo(to: Int): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Short.downTo(to: Int): IntProgression +public expect infix fun Short.downTo(to: Int): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Int.downTo(to: Long): LongProgression +public expect infix fun Int.downTo(to: Long): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Long.downTo(to: Long): LongProgression +public expect infix fun Long.downTo(to: Long): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Byte.downTo(to: Long): LongProgression +public expect infix fun Byte.downTo(to: Long): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Short.downTo(to: Long): LongProgression +public expect infix fun Short.downTo(to: Long): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Int.downTo(to: Short): IntProgression +public expect infix fun Int.downTo(to: Short): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Long.downTo(to: Short): LongProgression +public expect infix fun Long.downTo(to: Short): LongProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Byte.downTo(to: Short): IntProgression +public expect infix fun Byte.downTo(to: Short): IntProgression /** * Returns a progression from this value down to the specified [to] value with the step -1. * * The [to] value has to be less than this value. */ -public header infix fun Short.downTo(to: Short): IntProgression +public expect infix fun Short.downTo(to: Short): IntProgression /** * Returns a progression that goes over the same range in the opposite direction with the same step. */ -public header fun IntProgression.reversed(): IntProgression +public expect fun IntProgression.reversed(): IntProgression /** * Returns a progression that goes over the same range in the opposite direction with the same step. */ -public header fun LongProgression.reversed(): LongProgression +public expect fun LongProgression.reversed(): LongProgression /** * Returns a progression that goes over the same range in the opposite direction with the same step. */ -public header fun CharProgression.reversed(): CharProgression +public expect fun CharProgression.reversed(): CharProgression /** * Returns a progression that goes over the same range with the given step. */ -public header infix fun IntProgression.step(step: Int): IntProgression +public expect infix fun IntProgression.step(step: Int): IntProgression /** * Returns a progression that goes over the same range with the given step. */ -public header infix fun LongProgression.step(step: Long): LongProgression +public expect infix fun LongProgression.step(step: Long): LongProgression /** * Returns a progression that goes over the same range with the given step. */ -public header infix fun CharProgression.step(step: Int): CharProgression +public expect infix fun CharProgression.step(step: Int): CharProgression -internal header fun Int.toByteExactOrNull(): Byte? +internal expect fun Int.toByteExactOrNull(): Byte? -internal header fun Long.toByteExactOrNull(): Byte? +internal expect fun Long.toByteExactOrNull(): Byte? -internal header fun Short.toByteExactOrNull(): Byte? +internal expect fun Short.toByteExactOrNull(): Byte? -internal header fun Double.toByteExactOrNull(): Byte? +internal expect fun Double.toByteExactOrNull(): Byte? -internal header fun Float.toByteExactOrNull(): Byte? +internal expect fun Float.toByteExactOrNull(): Byte? -internal header fun Long.toIntExactOrNull(): Int? +internal expect fun Long.toIntExactOrNull(): Int? -internal header fun Double.toIntExactOrNull(): Int? +internal expect fun Double.toIntExactOrNull(): Int? -internal header fun Float.toIntExactOrNull(): Int? +internal expect fun Float.toIntExactOrNull(): Int? -internal header fun Double.toLongExactOrNull(): Long? +internal expect fun Double.toLongExactOrNull(): Long? -internal header fun Float.toLongExactOrNull(): Long? +internal expect fun Float.toLongExactOrNull(): Long? -internal header fun Int.toShortExactOrNull(): Short? +internal expect fun Int.toShortExactOrNull(): Short? -internal header fun Long.toShortExactOrNull(): Short? +internal expect fun Long.toShortExactOrNull(): Short? -internal header fun Double.toShortExactOrNull(): Short? +internal expect fun Double.toShortExactOrNull(): Short? -internal header fun Float.toShortExactOrNull(): Short? +internal expect fun Float.toShortExactOrNull(): Short? /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Int.until(to: Byte): IntRange +public expect infix fun Int.until(to: Byte): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Long.until(to: Byte): LongRange +public expect infix fun Long.until(to: Byte): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Byte.until(to: Byte): IntRange +public expect infix fun Byte.until(to: Byte): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Short.until(to: Byte): IntRange +public expect infix fun Short.until(to: Byte): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to ['\u0000'] the returned range is empty. */ -public header infix fun Char.until(to: Char): CharRange +public expect infix fun Char.until(to: Char): CharRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Int.MIN_VALUE] the returned range is empty. */ -public header infix fun Int.until(to: Int): IntRange +public expect infix fun Int.until(to: Int): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Long.until(to: Int): LongRange +public expect infix fun Long.until(to: Int): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Int.MIN_VALUE] the returned range is empty. */ -public header infix fun Byte.until(to: Int): IntRange +public expect infix fun Byte.until(to: Int): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Int.MIN_VALUE] the returned range is empty. */ -public header infix fun Short.until(to: Int): IntRange +public expect infix fun Short.until(to: Int): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Long.MIN_VALUE] the returned range is empty. */ -public header infix fun Int.until(to: Long): LongRange +public expect infix fun Int.until(to: Long): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Long.MIN_VALUE] the returned range is empty. */ -public header infix fun Long.until(to: Long): LongRange +public expect infix fun Long.until(to: Long): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Long.MIN_VALUE] the returned range is empty. */ -public header infix fun Byte.until(to: Long): LongRange +public expect infix fun Byte.until(to: Long): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. * * If the [to] value is less than or equal to [Long.MIN_VALUE] the returned range is empty. */ -public header infix fun Short.until(to: Long): LongRange +public expect infix fun Short.until(to: Long): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Int.until(to: Short): IntRange +public expect infix fun Int.until(to: Short): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Long.until(to: Short): LongRange +public expect infix fun Long.until(to: Short): LongRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Byte.until(to: Short): IntRange +public expect infix fun Byte.until(to: Short): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. */ -public header infix fun Short.until(to: Short): IntRange +public expect infix fun Short.until(to: Short): IntRange /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun > T.coerceAtLeast(minimumValue: T): T +public expect fun > T.coerceAtLeast(minimumValue: T): T /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun Byte.coerceAtLeast(minimumValue: Byte): Byte +public expect fun Byte.coerceAtLeast(minimumValue: Byte): Byte /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun Short.coerceAtLeast(minimumValue: Short): Short +public expect fun Short.coerceAtLeast(minimumValue: Short): Short /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun Int.coerceAtLeast(minimumValue: Int): Int +public expect fun Int.coerceAtLeast(minimumValue: Int): Int /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun Long.coerceAtLeast(minimumValue: Long): Long +public expect fun Long.coerceAtLeast(minimumValue: Long): Long /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun Float.coerceAtLeast(minimumValue: Float): Float +public expect fun Float.coerceAtLeast(minimumValue: Float): Float /** * Ensures that this value is not less than the specified [minimumValue]. * * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise. */ -public header fun Double.coerceAtLeast(minimumValue: Double): Double +public expect fun Double.coerceAtLeast(minimumValue: Double): Double /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun > T.coerceAtMost(maximumValue: T): T +public expect fun > T.coerceAtMost(maximumValue: T): T /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun Byte.coerceAtMost(maximumValue: Byte): Byte +public expect fun Byte.coerceAtMost(maximumValue: Byte): Byte /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun Short.coerceAtMost(maximumValue: Short): Short +public expect fun Short.coerceAtMost(maximumValue: Short): Short /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun Int.coerceAtMost(maximumValue: Int): Int +public expect fun Int.coerceAtMost(maximumValue: Int): Int /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun Long.coerceAtMost(maximumValue: Long): Long +public expect fun Long.coerceAtMost(maximumValue: Long): Long /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun Float.coerceAtMost(maximumValue: Float): Float +public expect fun Float.coerceAtMost(maximumValue: Float): Float /** * Ensures that this value is not greater than the specified [maximumValue]. * * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise. */ -public header fun Double.coerceAtMost(maximumValue: Double): Double +public expect fun Double.coerceAtMost(maximumValue: Double): Double /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun > T.coerceIn(minimumValue: T?, maximumValue: T?): T +public expect fun > T.coerceIn(minimumValue: T?, maximumValue: T?): T /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun Byte.coerceIn(minimumValue: Byte, maximumValue: Byte): Byte +public expect fun Byte.coerceIn(minimumValue: Byte, maximumValue: Byte): Byte /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun Short.coerceIn(minimumValue: Short, maximumValue: Short): Short +public expect fun Short.coerceIn(minimumValue: Short, maximumValue: Short): Short /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun Int.coerceIn(minimumValue: Int, maximumValue: Int): Int +public expect fun Int.coerceIn(minimumValue: Int, maximumValue: Int): Int /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun Long.coerceIn(minimumValue: Long, maximumValue: Long): Long +public expect fun Long.coerceIn(minimumValue: Long, maximumValue: Long): Long /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun Float.coerceIn(minimumValue: Float, maximumValue: Float): Float +public expect fun Float.coerceIn(minimumValue: Float, maximumValue: Float): Float /** * Ensures that this value lies in the specified range [minimumValue]..[maximumValue]. * * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue]. */ -public header fun Double.coerceIn(minimumValue: Double, maximumValue: Double): Double +public expect fun Double.coerceIn(minimumValue: Double, maximumValue: Double): Double /** * Ensures that this value lies in the specified [range]. @@ -621,26 +621,26 @@ public header fun Double.coerceIn(minimumValue: Double, maximumValue: Double): D * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ @SinceKotlin("1.1") -public header fun > T.coerceIn(range: ClosedFloatingPointRange): T +public expect fun > T.coerceIn(range: ClosedFloatingPointRange): T /** * Ensures that this value lies in the specified [range]. * * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ -public header fun > T.coerceIn(range: ClosedRange): T +public expect fun > T.coerceIn(range: ClosedRange): T /** * Ensures that this value lies in the specified [range]. * * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ -public header fun Int.coerceIn(range: ClosedRange): Int +public expect fun Int.coerceIn(range: ClosedRange): Int /** * Ensures that this value lies in the specified [range]. * * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ -public header fun Long.coerceIn(range: ClosedRange): Long +public expect fun Long.coerceIn(range: ClosedRange): Long diff --git a/libraries/stdlib/common/src/generated/_Sequences.kt b/libraries/stdlib/common/src/generated/_Sequences.kt index 68e5d07e5a7..fc142492987 100644 --- a/libraries/stdlib/common/src/generated/_Sequences.kt +++ b/libraries/stdlib/common/src/generated/_Sequences.kt @@ -15,28 +15,28 @@ import kotlin.comparisons.* * * The operation is _terminal_. */ -public header operator fun <@kotlin.internal.OnlyInputTypes T> Sequence.contains(element: T): Boolean +public expect operator fun <@kotlin.internal.OnlyInputTypes T> Sequence.contains(element: T): Boolean /** * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this sequence. * * The operation is _terminal_. */ -public header fun Sequence.elementAt(index: Int): T +public expect fun Sequence.elementAt(index: Int): T /** * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this sequence. * * The operation is _terminal_. */ -public header fun Sequence.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T +public expect fun Sequence.elementAtOrElse(index: Int, defaultValue: (Int) -> T): T /** * Returns an element at the given [index] or `null` if the [index] is out of bounds of this sequence. * * The operation is _terminal_. */ -public header fun Sequence.elementAtOrNull(index: Int): T? +public expect fun Sequence.elementAtOrNull(index: Int): T? /** * Returns the first element matching the given [predicate], or `null` if no such element was found. @@ -44,7 +44,7 @@ public header fun Sequence.elementAtOrNull(index: Int): T? * The operation is _terminal_. */ @kotlin.internal.InlineOnly -public header inline fun Sequence.find(predicate: (T) -> Boolean): T? +public expect inline fun Sequence.find(predicate: (T) -> Boolean): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. @@ -52,7 +52,7 @@ public header inline fun Sequence.find(predicate: (T) -> Boolean): T? * The operation is _terminal_. */ @kotlin.internal.InlineOnly -public header inline fun Sequence.findLast(predicate: (T) -> Boolean): T? +public expect inline fun Sequence.findLast(predicate: (T) -> Boolean): T? /** * Returns first element. @@ -60,7 +60,7 @@ public header inline fun Sequence.findLast(predicate: (T) -> Boolean): T? * * The operation is _terminal_. */ -public header fun Sequence.first(): T +public expect fun Sequence.first(): T /** * Returns the first element matching the given [predicate]. @@ -68,42 +68,42 @@ public header fun Sequence.first(): T * * The operation is _terminal_. */ -public header inline fun Sequence.first(predicate: (T) -> Boolean): T +public expect inline fun Sequence.first(predicate: (T) -> Boolean): T /** * Returns the first element, or `null` if the sequence is empty. * * The operation is _terminal_. */ -public header fun Sequence.firstOrNull(): T? +public expect fun Sequence.firstOrNull(): T? /** * Returns the first element matching the given [predicate], or `null` if element was not found. * * The operation is _terminal_. */ -public header inline fun Sequence.firstOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Sequence.firstOrNull(predicate: (T) -> Boolean): T? /** * Returns first index of [element], or -1 if the sequence does not contain element. * * The operation is _terminal_. */ -public header fun <@kotlin.internal.OnlyInputTypes T> Sequence.indexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> Sequence.indexOf(element: T): Int /** * Returns index of the first element matching the given [predicate], or -1 if the sequence does not contain such element. * * The operation is _terminal_. */ -public header inline fun Sequence.indexOfFirst(predicate: (T) -> Boolean): Int +public expect inline fun Sequence.indexOfFirst(predicate: (T) -> Boolean): Int /** * Returns index of the last element matching the given [predicate], or -1 if the sequence does not contain such element. * * The operation is _terminal_. */ -public header inline fun Sequence.indexOfLast(predicate: (T) -> Boolean): Int +public expect inline fun Sequence.indexOfLast(predicate: (T) -> Boolean): Int /** * Returns the last element. @@ -111,7 +111,7 @@ public header inline fun Sequence.indexOfLast(predicate: (T) -> Boolean): * * The operation is _terminal_. */ -public header fun Sequence.last(): T +public expect fun Sequence.last(): T /** * Returns the last element matching the given [predicate]. @@ -119,77 +119,77 @@ public header fun Sequence.last(): T * * The operation is _terminal_. */ -public header inline fun Sequence.last(predicate: (T) -> Boolean): T +public expect inline fun Sequence.last(predicate: (T) -> Boolean): T /** * Returns last index of [element], or -1 if the sequence does not contain element. * * The operation is _terminal_. */ -public header fun <@kotlin.internal.OnlyInputTypes T> Sequence.lastIndexOf(element: T): Int +public expect fun <@kotlin.internal.OnlyInputTypes T> Sequence.lastIndexOf(element: T): Int /** * Returns the last element, or `null` if the sequence is empty. * * The operation is _terminal_. */ -public header fun Sequence.lastOrNull(): T? +public expect fun Sequence.lastOrNull(): T? /** * Returns the last element matching the given [predicate], or `null` if no such element was found. * * The operation is _terminal_. */ -public header inline fun Sequence.lastOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Sequence.lastOrNull(predicate: (T) -> Boolean): T? /** * Returns the single element, or throws an exception if the sequence is empty or has more than one element. * * The operation is _terminal_. */ -public header fun Sequence.single(): T +public expect fun Sequence.single(): T /** * Returns the single element matching the given [predicate], or throws exception if there is no or more than one matching element. * * The operation is _terminal_. */ -public header inline fun Sequence.single(predicate: (T) -> Boolean): T +public expect inline fun Sequence.single(predicate: (T) -> Boolean): T /** * Returns single element, or `null` if the sequence is empty or has more than one element. * * The operation is _terminal_. */ -public header fun Sequence.singleOrNull(): T? +public expect fun Sequence.singleOrNull(): T? /** * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found. * * The operation is _terminal_. */ -public header inline fun Sequence.singleOrNull(predicate: (T) -> Boolean): T? +public expect inline fun Sequence.singleOrNull(predicate: (T) -> Boolean): T? /** * Returns a sequence containing all elements except first [n] elements. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.drop(n: Int): Sequence +public expect fun Sequence.drop(n: Int): Sequence /** * Returns a sequence containing all elements except first elements that satisfy the given [predicate]. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.dropWhile(predicate: (T) -> Boolean): Sequence +public expect fun Sequence.dropWhile(predicate: (T) -> Boolean): Sequence /** * Returns a sequence containing only elements matching the given [predicate]. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.filter(predicate: (T) -> Boolean): Sequence +public expect fun Sequence.filter(predicate: (T) -> Boolean): Sequence /** * Returns a sequence containing only elements matching the given [predicate]. @@ -198,7 +198,7 @@ public header fun Sequence.filter(predicate: (T) -> Boolean): Sequence * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.filterIndexed(predicate: (index: Int, T) -> Boolean): Sequence +public expect fun Sequence.filterIndexed(predicate: (index: Int, T) -> Boolean): Sequence /** * Appends all elements matching the given [predicate] to the given [destination]. @@ -207,105 +207,105 @@ public header fun Sequence.filterIndexed(predicate: (index: Int, T) -> Bo * * The operation is _terminal_. */ -public header inline fun > Sequence.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C +public expect 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. * * The operation is _intermediate_ and _stateless_. */ -public header inline fun Sequence<*>.filterIsInstance(): Sequence<@kotlin.internal.NoInfer R> +public expect inline fun Sequence<*>.filterIsInstance(): Sequence<@kotlin.internal.NoInfer R> /** * Appends all elements that are instances of specified type parameter R to the given [destination]. * * The operation is _terminal_. */ -public header inline fun > Sequence<*>.filterIsInstanceTo(destination: C): C +public expect inline fun > Sequence<*>.filterIsInstanceTo(destination: C): C /** * Returns a sequence containing all elements not matching the given [predicate]. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.filterNot(predicate: (T) -> Boolean): Sequence +public expect fun Sequence.filterNot(predicate: (T) -> Boolean): Sequence /** * Returns a sequence containing all elements that are not `null`. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.filterNotNull(): Sequence +public expect fun Sequence.filterNotNull(): Sequence /** * Appends all elements that are not `null` to the given [destination]. * * The operation is _terminal_. */ -public header fun , T : Any> Sequence.filterNotNullTo(destination: C): C +public expect fun , T : Any> Sequence.filterNotNullTo(destination: C): C /** * Appends all elements not matching the given [predicate] to the given [destination]. * * The operation is _terminal_. */ -public header inline fun > Sequence.filterNotTo(destination: C, predicate: (T) -> Boolean): C +public expect inline fun > Sequence.filterNotTo(destination: C, predicate: (T) -> Boolean): C /** * Appends all elements matching the given [predicate] to the given [destination]. * * The operation is _terminal_. */ -public header inline fun > Sequence.filterTo(destination: C, predicate: (T) -> Boolean): C +public expect inline fun > Sequence.filterTo(destination: C, predicate: (T) -> Boolean): C /** * Returns a sequence containing first [n] elements. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.take(n: Int): Sequence +public expect fun Sequence.take(n: Int): Sequence /** * Returns a sequence containing first elements satisfying the given [predicate]. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.takeWhile(predicate: (T) -> Boolean): Sequence +public expect fun Sequence.takeWhile(predicate: (T) -> Boolean): Sequence /** * Returns a sequence that yields elements of this sequence sorted according to their natural sort order. * * The operation is _intermediate_ and _stateful_. */ -public header fun > Sequence.sorted(): Sequence +public expect fun > Sequence.sorted(): Sequence /** * Returns a sequence that yields elements of this sequence sorted according to natural sort order of the value returned by specified [selector] function. * * The operation is _intermediate_ and _stateful_. */ -public header inline fun > Sequence.sortedBy(crossinline selector: (T) -> R?): Sequence +public expect inline fun > Sequence.sortedBy(crossinline selector: (T) -> R?): Sequence /** * Returns a sequence that yields elements of this sequence sorted descending according to natural sort order of the value returned by specified [selector] function. * * The operation is _intermediate_ and _stateful_. */ -public header inline fun > Sequence.sortedByDescending(crossinline selector: (T) -> R?): Sequence +public expect inline fun > Sequence.sortedByDescending(crossinline selector: (T) -> R?): Sequence /** * Returns a sequence that yields elements of this sequence sorted descending according to their natural sort order. * * The operation is _intermediate_ and _stateful_. */ -public header fun > Sequence.sortedDescending(): Sequence +public expect fun > Sequence.sortedDescending(): Sequence /** * Returns a sequence that yields elements of this sequence sorted according to the specified [comparator]. * * The operation is _intermediate_ and _stateful_. */ -public header fun Sequence.sortedWith(comparator: Comparator): Sequence +public expect fun Sequence.sortedWith(comparator: Comparator): Sequence /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -317,7 +317,7 @@ public header fun Sequence.sortedWith(comparator: Comparator): Sequ * * The operation is _terminal_. */ -public header inline fun Sequence.associate(transform: (T) -> Pair): Map +public expect inline fun Sequence.associate(transform: (T) -> Pair): Map /** * Returns a [Map] containing the elements from the given sequence indexed by the key @@ -329,7 +329,7 @@ public header inline fun Sequence.associate(transform: (T) -> Pair< * * The operation is _terminal_. */ -public header inline fun Sequence.associateBy(keySelector: (T) -> K): Map +public expect inline fun Sequence.associateBy(keySelector: (T) -> K): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given sequence. @@ -340,7 +340,7 @@ public header inline fun Sequence.associateBy(keySelector: (T) -> K): * * The operation is _terminal_. */ -public header inline fun Sequence.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map +public expect inline fun Sequence.associateBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -351,7 +351,7 @@ public header inline fun Sequence.associateBy(keySelector: (T) -> K * * The operation is _terminal_. */ -public header inline fun > Sequence.associateByTo(destination: M, keySelector: (T) -> K): M +public expect inline fun > Sequence.associateByTo(destination: M, keySelector: (T) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -362,7 +362,7 @@ public header inline fun > Sequence.associat * * The operation is _terminal_. */ -public header inline fun > Sequence.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M +public expect inline fun > Sequence.associateByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -372,35 +372,35 @@ public header inline fun > Sequence.assoc * * The operation is _terminal_. */ -public header inline fun > Sequence.associateTo(destination: M, transform: (T) -> Pair): M +public expect inline fun > Sequence.associateTo(destination: M, transform: (T) -> Pair): M /** * Appends all elements to the given [destination] collection. * * The operation is _terminal_. */ -public header fun > Sequence.toCollection(destination: C): C +public expect fun > Sequence.toCollection(destination: C): C /** * Returns a [HashSet] of all elements. * * The operation is _terminal_. */ -public header fun Sequence.toHashSet(): HashSet +public expect fun Sequence.toHashSet(): HashSet /** * Returns a [List] containing all elements. * * The operation is _terminal_. */ -public header fun Sequence.toList(): List +public expect fun Sequence.toList(): List /** * Returns a [MutableList] filled with all elements of this sequence. * * The operation is _terminal_. */ -public header fun Sequence.toMutableList(): MutableList +public expect fun Sequence.toMutableList(): MutableList /** * Returns a [Set] of all elements. @@ -409,21 +409,21 @@ public header fun Sequence.toMutableList(): MutableList * * The operation is _terminal_. */ -public header fun Sequence.toSet(): Set +public expect fun Sequence.toSet(): Set /** * Returns a single sequence of all elements from results of [transform] function being invoked on each element of original sequence. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.flatMap(transform: (T) -> Sequence): Sequence +public expect fun Sequence.flatMap(transform: (T) -> Sequence): Sequence /** * Appends all elements yielded from results of [transform] function being invoked on each element of original sequence, to the given [destination]. * * The operation is _terminal_. */ -public header inline fun > Sequence.flatMapTo(destination: C, transform: (T) -> Sequence): C +public expect inline fun > Sequence.flatMapTo(destination: C, transform: (T) -> Sequence): C /** * Groups elements of the original sequence by the key returned by the given [keySelector] function @@ -435,7 +435,7 @@ public header inline fun > Sequence.flatMap * * The operation is _terminal_. */ -public header inline fun Sequence.groupBy(keySelector: (T) -> K): Map> +public expect inline fun Sequence.groupBy(keySelector: (T) -> K): Map> /** * Groups values returned by the [valueTransform] function applied to each element of the original sequence @@ -448,7 +448,7 @@ public header inline fun Sequence.groupBy(keySelector: (T) -> K): Map< * * The operation is _terminal_. */ -public header inline fun Sequence.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> +public expect inline fun Sequence.groupBy(keySelector: (T) -> K, valueTransform: (T) -> V): Map> /** * Groups elements of the original sequence by the key returned by the given [keySelector] function @@ -460,7 +460,7 @@ public header inline fun Sequence.groupBy(keySelector: (T) -> K, va * * The operation is _terminal_. */ -public header inline fun >> Sequence.groupByTo(destination: M, keySelector: (T) -> K): M +public expect inline fun >> Sequence.groupByTo(destination: M, keySelector: (T) -> K): M /** * Groups values returned by the [valueTransform] function applied to each element of the original sequence @@ -473,7 +473,7 @@ public header inline fun >> Sequence>> Sequence.groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M +public expect inline fun >> Sequence.groupByTo(destination: M, keySelector: (T) -> K, valueTransform: (T) -> V): M /** * Creates a [Grouping] source from a sequence to be used later with one of group-and-fold operations @@ -484,7 +484,7 @@ public header inline fun >> Sequenc * The operation is _intermediate_ and _stateless_. */ @SinceKotlin("1.1") -public header inline fun Sequence.groupingBy(crossinline keySelector: (T) -> K): Grouping +public expect inline fun Sequence.groupingBy(crossinline keySelector: (T) -> K): Grouping /** * Returns a sequence containing the results of applying the given [transform] function @@ -492,7 +492,7 @@ public header inline fun Sequence.groupingBy(crossinline keySelector: * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.map(transform: (T) -> R): Sequence +public expect fun Sequence.map(transform: (T) -> R): Sequence /** * Returns a sequence containing the results of applying the given [transform] function @@ -502,7 +502,7 @@ public header fun Sequence.map(transform: (T) -> R): Sequence * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.mapIndexed(transform: (index: Int, T) -> R): Sequence +public expect fun Sequence.mapIndexed(transform: (index: Int, T) -> R): Sequence /** * Returns a sequence containing only the non-null results of applying the given [transform] function @@ -512,7 +512,7 @@ public header fun Sequence.mapIndexed(transform: (index: Int, T) -> R) * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.mapIndexedNotNull(transform: (index: Int, T) -> R?): Sequence +public expect fun Sequence.mapIndexedNotNull(transform: (index: Int, T) -> R?): Sequence /** * Applies the given [transform] function to each element and its index in the original sequence @@ -522,7 +522,7 @@ public header fun Sequence.mapIndexedNotNull(transform: (index: * * The operation is _terminal_. */ -public header inline fun > Sequence.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C +public expect 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 @@ -532,7 +532,7 @@ public header inline fun > Sequence.m * * The operation is _terminal_. */ -public header inline fun > Sequence.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C +public expect 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 @@ -540,7 +540,7 @@ public header inline fun > Sequence.mapInde * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.mapNotNull(transform: (T) -> R?): Sequence +public expect fun Sequence.mapNotNull(transform: (T) -> R?): Sequence /** * Applies the given [transform] function to each element in the original sequence @@ -548,7 +548,7 @@ public header fun Sequence.mapNotNull(transform: (T) -> R?): Seq * * The operation is _terminal_. */ -public header inline fun > Sequence.mapNotNullTo(destination: C, transform: (T) -> R?): C +public expect inline fun > Sequence.mapNotNullTo(destination: C, transform: (T) -> R?): C /** * Applies the given [transform] function to each element of the original sequence @@ -556,14 +556,14 @@ public header inline fun > Sequence.m * * The operation is _terminal_. */ -public header inline fun > Sequence.mapTo(destination: C, transform: (T) -> R): C +public expect inline fun > Sequence.mapTo(destination: C, transform: (T) -> R): C /** * Returns a sequence of [IndexedValue] for each element of the original sequence. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.withIndex(): Sequence> +public expect fun Sequence.withIndex(): Sequence> /** * Returns a sequence containing only distinct elements from the given sequence. @@ -572,7 +572,7 @@ public header fun Sequence.withIndex(): Sequence> * * The operation is _intermediate_ and _stateful_. */ -public header fun Sequence.distinct(): Sequence +public expect fun Sequence.distinct(): Sequence /** * Returns a sequence containing only elements from the given sequence @@ -582,7 +582,7 @@ public header fun Sequence.distinct(): Sequence * * The operation is _intermediate_ and _stateful_. */ -public header fun Sequence.distinctBy(selector: (T) -> K): Sequence +public expect fun Sequence.distinctBy(selector: (T) -> K): Sequence /** * Returns a mutable set containing all distinct elements from the given sequence. @@ -591,49 +591,49 @@ public header fun Sequence.distinctBy(selector: (T) -> K): Sequence * * The operation is _terminal_. */ -public header fun Sequence.toMutableSet(): MutableSet +public expect fun Sequence.toMutableSet(): MutableSet /** * Returns `true` if all elements match the given [predicate]. * * The operation is _terminal_. */ -public header inline fun Sequence.all(predicate: (T) -> Boolean): Boolean +public expect inline fun Sequence.all(predicate: (T) -> Boolean): Boolean /** * Returns `true` if sequence has at least one element. * * The operation is _terminal_. */ -public header fun Sequence.any(): Boolean +public expect fun Sequence.any(): Boolean /** * Returns `true` if at least one element matches the given [predicate]. * * The operation is _terminal_. */ -public header inline fun Sequence.any(predicate: (T) -> Boolean): Boolean +public expect inline fun Sequence.any(predicate: (T) -> Boolean): Boolean /** * Returns the number of elements in this sequence. * * The operation is _terminal_. */ -public header fun Sequence.count(): Int +public expect fun Sequence.count(): Int /** * Returns the number of elements matching the given [predicate]. * * The operation is _terminal_. */ -public header inline fun Sequence.count(predicate: (T) -> Boolean): Int +public expect 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. * * The operation is _terminal_. */ -public header inline fun Sequence.fold(initial: R, operation: (acc: R, T) -> R): R +public expect 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 @@ -643,14 +643,14 @@ public header inline fun Sequence.fold(initial: R, operation: (acc: R, * * The operation is _terminal_. */ -public header inline fun Sequence.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R +public expect inline fun Sequence.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R /** * Performs the given [action] on each element. * * The operation is _terminal_. */ -public header inline fun Sequence.forEach(action: (T) -> Unit): Unit +public expect inline fun Sequence.forEach(action: (T) -> Unit): Unit /** * Performs the given [action] on each element, providing sequential index with the element. @@ -659,7 +659,7 @@ public header inline fun Sequence.forEach(action: (T) -> Unit): Unit * * The operation is _terminal_. */ -public header inline fun Sequence.forEachIndexed(action: (index: Int, T) -> Unit): Unit +public expect inline fun Sequence.forEachIndexed(action: (index: Int, T) -> Unit): Unit /** * Returns the largest element or `null` if there are no elements. @@ -669,7 +669,7 @@ public header inline fun Sequence.forEachIndexed(action: (index: Int, T) * The operation is _terminal_. */ @SinceKotlin("1.1") -public header fun Sequence.max(): Double? +public expect fun Sequence.max(): Double? /** * Returns the largest element or `null` if there are no elements. @@ -679,28 +679,28 @@ public header fun Sequence.max(): Double? * The operation is _terminal_. */ @SinceKotlin("1.1") -public header fun Sequence.max(): Float? +public expect fun Sequence.max(): Float? /** * Returns the largest element or `null` if there are no elements. * * The operation is _terminal_. */ -public header fun > Sequence.max(): T? +public expect fun > Sequence.max(): T? /** * Returns the first element yielding the largest value of the given function or `null` if there are no elements. * * The operation is _terminal_. */ -public header inline fun > Sequence.maxBy(selector: (T) -> R): T? +public expect inline fun > Sequence.maxBy(selector: (T) -> R): T? /** * Returns the first element having the largest value according to the provided [comparator] or `null` if there are no elements. * * The operation is _terminal_. */ -public header fun Sequence.maxWith(comparator: Comparator): T? +public expect fun Sequence.maxWith(comparator: Comparator): T? /** * Returns the smallest element or `null` if there are no elements. @@ -710,7 +710,7 @@ public header fun Sequence.maxWith(comparator: Comparator): T? * The operation is _terminal_. */ @SinceKotlin("1.1") -public header fun Sequence.min(): Double? +public expect fun Sequence.min(): Double? /** * Returns the smallest element or `null` if there are no elements. @@ -720,42 +720,42 @@ public header fun Sequence.min(): Double? * The operation is _terminal_. */ @SinceKotlin("1.1") -public header fun Sequence.min(): Float? +public expect fun Sequence.min(): Float? /** * Returns the smallest element or `null` if there are no elements. * * The operation is _terminal_. */ -public header fun > Sequence.min(): T? +public expect fun > Sequence.min(): T? /** * Returns the first element yielding the smallest value of the given function or `null` if there are no elements. * * The operation is _terminal_. */ -public header inline fun > Sequence.minBy(selector: (T) -> R): T? +public expect inline fun > Sequence.minBy(selector: (T) -> R): T? /** * Returns the first element having the smallest value according to the provided [comparator] or `null` if there are no elements. * * The operation is _terminal_. */ -public header fun Sequence.minWith(comparator: Comparator): T? +public expect fun Sequence.minWith(comparator: Comparator): T? /** * Returns `true` if the sequence has no elements. * * The operation is _terminal_. */ -public header fun Sequence.none(): Boolean +public expect fun Sequence.none(): Boolean /** * Returns `true` if no elements match the given [predicate]. * * The operation is _terminal_. */ -public header inline fun Sequence.none(predicate: (T) -> Boolean): Boolean +public expect inline fun Sequence.none(predicate: (T) -> Boolean): Boolean /** * Returns a sequence which performs the given [action] on each element of the original sequence as they pass though it. @@ -763,14 +763,14 @@ public header inline fun Sequence.none(predicate: (T) -> Boolean): Boolea * The operation is _intermediate_ and _stateless_. */ @SinceKotlin("1.1") -public header fun Sequence.onEach(action: (T) -> Unit): Sequence +public expect 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. * * The operation is _terminal_. */ -public header inline fun Sequence.reduce(operation: (acc: S, T) -> S): S +public expect inline fun Sequence.reduce(operation: (acc: S, T) -> S): S /** * Accumulates value starting with the first element and applying [operation] from left to right @@ -780,35 +780,35 @@ public header inline fun Sequence.reduce(operation: (acc: S, T) -> * * The operation is _terminal_. */ -public header inline fun Sequence.reduceIndexed(operation: (index: Int, acc: S, T) -> S): S +public expect 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. * * The operation is _terminal_. */ -public header inline fun Sequence.sumBy(selector: (T) -> Int): Int +public expect inline fun Sequence.sumBy(selector: (T) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each element in the sequence. * * The operation is _terminal_. */ -public header inline fun Sequence.sumByDouble(selector: (T) -> Double): Double +public expect inline fun Sequence.sumByDouble(selector: (T) -> Double): Double /** * Returns an original collection containing all the non-`null` elements, throwing an [IllegalArgumentException] if there are any `null` elements. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.requireNoNulls(): Sequence +public expect fun Sequence.requireNoNulls(): Sequence /** * Returns a sequence containing all elements of the original sequence without the first occurrence of the given [element]. * * The operation is _intermediate_ and _stateless_. */ -public header operator fun Sequence.minus(element: T): Sequence +public expect operator fun Sequence.minus(element: T): Sequence /** * Returns a sequence containing all elements of original sequence except the elements contained in the given [elements] array. @@ -818,7 +818,7 @@ public header operator fun Sequence.minus(element: T): Sequence * * The operation is _intermediate_ and _stateful_. */ -public header operator fun Sequence.minus(elements: Array): Sequence +public expect operator fun Sequence.minus(elements: Array): Sequence /** * Returns a sequence containing all elements of original sequence except the elements contained in the given [elements] collection. @@ -828,7 +828,7 @@ public header operator fun Sequence.minus(elements: Array): Sequen * * The operation is _intermediate_ and _stateful_. */ -public header operator fun Sequence.minus(elements: Iterable): Sequence +public expect operator fun Sequence.minus(elements: Iterable): Sequence /** * Returns a sequence containing all elements of original sequence except the elements contained in the given [elements] sequence. @@ -838,7 +838,7 @@ public header operator fun Sequence.minus(elements: Iterable): Sequenc * * The operation is _intermediate_ for this sequence and _terminal_ and _stateful_ for the [elements] sequence. */ -public header operator fun Sequence.minus(elements: Sequence): Sequence +public expect operator fun Sequence.minus(elements: Sequence): Sequence /** * Returns a sequence containing all elements of the original sequence without the first occurrence of the given [element]. @@ -846,7 +846,7 @@ public header operator fun Sequence.minus(elements: Sequence): Sequenc * The operation is _intermediate_ and _stateless_. */ @kotlin.internal.InlineOnly -public header inline fun Sequence.minusElement(element: T): Sequence +public expect inline fun Sequence.minusElement(element: T): Sequence /** * Splits the original sequence into pair of lists, @@ -855,14 +855,14 @@ public header inline fun Sequence.minusElement(element: T): Sequence * * The operation is _terminal_. */ -public header inline fun Sequence.partition(predicate: (T) -> Boolean): Pair, List> +public expect inline fun Sequence.partition(predicate: (T) -> Boolean): Pair, List> /** * Returns a sequence containing all elements of the original sequence and then the given [element]. * * The operation is _intermediate_ and _stateless_. */ -public header operator fun Sequence.plus(element: T): Sequence +public expect operator fun Sequence.plus(element: T): Sequence /** * Returns a sequence containing all elements of original sequence and then all elements of the given [elements] array. @@ -872,7 +872,7 @@ public header operator fun Sequence.plus(element: T): Sequence * * The operation is _intermediate_ and _stateless_. */ -public header operator fun Sequence.plus(elements: Array): Sequence +public expect operator fun Sequence.plus(elements: Array): Sequence /** * Returns a sequence containing all elements of original sequence and then all elements of the given [elements] collection. @@ -882,7 +882,7 @@ public header operator fun Sequence.plus(elements: Array): Sequenc * * The operation is _intermediate_ and _stateless_. */ -public header operator fun Sequence.plus(elements: Iterable): Sequence +public expect operator fun Sequence.plus(elements: Iterable): Sequence /** * Returns a sequence containing all elements of original sequence and then all elements of the given [elements] sequence. @@ -892,7 +892,7 @@ public header operator fun Sequence.plus(elements: Iterable): Sequence * * The operation is _intermediate_ and _stateless_. */ -public header operator fun Sequence.plus(elements: Sequence): Sequence +public expect operator fun Sequence.plus(elements: Sequence): Sequence /** * Returns a sequence containing all elements of the original sequence and then the given [element]. @@ -900,7 +900,7 @@ public header operator fun Sequence.plus(elements: Sequence): Sequence * The operation is _intermediate_ and _stateless_. */ @kotlin.internal.InlineOnly -public header inline fun Sequence.plusElement(element: T): Sequence +public expect inline fun Sequence.plusElement(element: T): Sequence /** * Returns a sequence of pairs built from elements of both sequences with same indexes. @@ -908,14 +908,14 @@ public header inline fun Sequence.plusElement(element: T): Sequence * * The operation is _intermediate_ and _stateless_. */ -public header infix fun Sequence.zip(other: Sequence): Sequence> +public expect 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. * * The operation is _intermediate_ and _stateless_. */ -public header fun Sequence.zip(other: Sequence, transform: (a: T, b: R) -> V): Sequence +public expect 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. @@ -954,13 +954,13 @@ public fun Sequence.joinToString(separator: CharSequence = ", ", prefix: /** * Creates an [Iterable] instance that wraps the original sequence returning its elements when being iterated. */ -public header fun Sequence.asIterable(): Iterable +public expect fun Sequence.asIterable(): Iterable /** * Returns this sequence as a [Sequence]. */ @kotlin.internal.InlineOnly -public header inline fun Sequence.asSequence(): Sequence +public expect inline fun Sequence.asSequence(): Sequence /** * Returns an average value of elements in the sequence. @@ -968,7 +968,7 @@ public header inline fun Sequence.asSequence(): Sequence * The operation is _terminal_. */ @kotlin.jvm.JvmName("averageOfByte") -public header fun Sequence.average(): Double +public expect fun Sequence.average(): Double /** * Returns an average value of elements in the sequence. @@ -976,7 +976,7 @@ public header fun Sequence.average(): Double * The operation is _terminal_. */ @kotlin.jvm.JvmName("averageOfShort") -public header fun Sequence.average(): Double +public expect fun Sequence.average(): Double /** * Returns an average value of elements in the sequence. @@ -984,7 +984,7 @@ public header fun Sequence.average(): Double * The operation is _terminal_. */ @kotlin.jvm.JvmName("averageOfInt") -public header fun Sequence.average(): Double +public expect fun Sequence.average(): Double /** * Returns an average value of elements in the sequence. @@ -992,7 +992,7 @@ public header fun Sequence.average(): Double * The operation is _terminal_. */ @kotlin.jvm.JvmName("averageOfLong") -public header fun Sequence.average(): Double +public expect fun Sequence.average(): Double /** * Returns an average value of elements in the sequence. @@ -1000,7 +1000,7 @@ public header fun Sequence.average(): Double * The operation is _terminal_. */ @kotlin.jvm.JvmName("averageOfFloat") -public header fun Sequence.average(): Double +public expect fun Sequence.average(): Double /** * Returns an average value of elements in the sequence. @@ -1008,7 +1008,7 @@ public header fun Sequence.average(): Double * The operation is _terminal_. */ @kotlin.jvm.JvmName("averageOfDouble") -public header fun Sequence.average(): Double +public expect fun Sequence.average(): Double /** * Returns the sum of all elements in the sequence. @@ -1016,7 +1016,7 @@ public header fun Sequence.average(): Double * The operation is _terminal_. */ @kotlin.jvm.JvmName("sumOfByte") -public header fun Sequence.sum(): Int +public expect fun Sequence.sum(): Int /** * Returns the sum of all elements in the sequence. @@ -1024,7 +1024,7 @@ public header fun Sequence.sum(): Int * The operation is _terminal_. */ @kotlin.jvm.JvmName("sumOfShort") -public header fun Sequence.sum(): Int +public expect fun Sequence.sum(): Int /** * Returns the sum of all elements in the sequence. @@ -1032,7 +1032,7 @@ public header fun Sequence.sum(): Int * The operation is _terminal_. */ @kotlin.jvm.JvmName("sumOfInt") -public header fun Sequence.sum(): Int +public expect fun Sequence.sum(): Int /** * Returns the sum of all elements in the sequence. @@ -1040,7 +1040,7 @@ public header fun Sequence.sum(): Int * The operation is _terminal_. */ @kotlin.jvm.JvmName("sumOfLong") -public header fun Sequence.sum(): Long +public expect fun Sequence.sum(): Long /** * Returns the sum of all elements in the sequence. @@ -1048,7 +1048,7 @@ public header fun Sequence.sum(): Long * The operation is _terminal_. */ @kotlin.jvm.JvmName("sumOfFloat") -public header fun Sequence.sum(): Float +public expect fun Sequence.sum(): Float /** * Returns the sum of all elements in the sequence. @@ -1056,5 +1056,5 @@ public header fun Sequence.sum(): Float * The operation is _terminal_. */ @kotlin.jvm.JvmName("sumOfDouble") -public header fun Sequence.sum(): Double +public expect fun Sequence.sum(): Double diff --git a/libraries/stdlib/common/src/generated/_Sets.kt b/libraries/stdlib/common/src/generated/_Sets.kt index 6bb09a9084a..f2ea941e2c2 100644 --- a/libraries/stdlib/common/src/generated/_Sets.kt +++ b/libraries/stdlib/common/src/generated/_Sets.kt @@ -15,28 +15,28 @@ import kotlin.comparisons.* * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.minus(element: T): Set +public expect operator fun Set.minus(element: T): Set /** * Returns a set containing all elements of the original set except the elements contained in the given [elements] array. * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.minus(elements: Array): Set +public expect operator fun Set.minus(elements: Array): Set /** * Returns a set containing all elements of the original set except the elements contained in the given [elements] collection. * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.minus(elements: Iterable): Set +public expect operator fun Set.minus(elements: Iterable): Set /** * Returns a set containing all elements of the original set except the elements contained in the given [elements] sequence. * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.minus(elements: Sequence): Set +public expect operator fun Set.minus(elements: Sequence): Set /** * Returns a set containing all elements of the original set except the given [element]. @@ -44,14 +44,14 @@ public header operator fun Set.minus(elements: Sequence): Set * The returned set preserves the element iteration order of the original set. */ @kotlin.internal.InlineOnly -public header inline fun Set.minusElement(element: T): Set +public expect inline fun Set.minusElement(element: T): Set /** * Returns a set containing all elements of the original set and then the given [element] if it isn't already in this set. * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.plus(element: T): Set +public expect operator fun Set.plus(element: T): Set /** * Returns a set containing all elements of the original set and the given [elements] array, @@ -59,14 +59,14 @@ public header operator fun Set.plus(element: T): Set * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.plus(elements: Array): Set +public expect operator fun Set.plus(elements: Array): Set /** * Returns a set containing all elements of the original set and the given [elements] collection, * which aren't already in this set. * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.plus(elements: Iterable): Set +public expect operator fun Set.plus(elements: Iterable): Set /** * Returns a set containing all elements of the original set and the given [elements] sequence, @@ -74,7 +74,7 @@ public header operator fun Set.plus(elements: Iterable): Set * * The returned set preserves the element iteration order of the original set. */ -public header operator fun Set.plus(elements: Sequence): Set +public expect operator fun Set.plus(elements: Sequence): Set /** * Returns a set containing all elements of the original set and then the given [element] if it isn't already in this set. @@ -82,5 +82,5 @@ public header operator fun Set.plus(elements: Sequence): Set * The returned set preserves the element iteration order of the original set. */ @kotlin.internal.InlineOnly -public header inline fun Set.plusElement(element: T): Set +public expect inline fun Set.plusElement(element: T): Set diff --git a/libraries/stdlib/common/src/generated/_Strings.kt b/libraries/stdlib/common/src/generated/_Strings.kt index d9c01c0a404..b6d70155717 100644 --- a/libraries/stdlib/common/src/generated/_Strings.kt +++ b/libraries/stdlib/common/src/generated/_Strings.kt @@ -14,279 +14,279 @@ import kotlin.comparisons.* * Returns a character at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this char sequence. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.elementAt(index: Int): Char +public expect inline fun CharSequence.elementAt(index: Int): Char /** * Returns a character at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this char sequence. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.elementAtOrElse(index: Int, defaultValue: (Int) -> Char): Char +public expect inline fun CharSequence.elementAtOrElse(index: Int, defaultValue: (Int) -> Char): Char /** * Returns a character at the given [index] or `null` if the [index] is out of bounds of this char sequence. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.elementAtOrNull(index: Int): Char? +public expect inline fun CharSequence.elementAtOrNull(index: Int): Char? /** * Returns the first character matching the given [predicate], or `null` if no such character was found. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.find(predicate: (Char) -> Boolean): Char? +public expect inline fun CharSequence.find(predicate: (Char) -> Boolean): Char? /** * Returns the last character matching the given [predicate], or `null` if no such character was found. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.findLast(predicate: (Char) -> Boolean): Char? +public expect inline fun CharSequence.findLast(predicate: (Char) -> Boolean): Char? /** * Returns first character. * @throws [NoSuchElementException] if the char sequence is empty. */ -public header fun CharSequence.first(): Char +public expect fun CharSequence.first(): Char /** * Returns the first character matching the given [predicate]. * @throws [NoSuchElementException] if no such character is found. */ -public header inline fun CharSequence.first(predicate: (Char) -> Boolean): Char +public expect inline fun CharSequence.first(predicate: (Char) -> Boolean): Char /** * Returns the first character, or `null` if the char sequence is empty. */ -public header fun CharSequence.firstOrNull(): Char? +public expect fun CharSequence.firstOrNull(): Char? /** * Returns the first character matching the given [predicate], or `null` if character was not found. */ -public header inline fun CharSequence.firstOrNull(predicate: (Char) -> Boolean): Char? +public expect inline fun CharSequence.firstOrNull(predicate: (Char) -> Boolean): Char? /** * Returns a character at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this char sequence. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.getOrElse(index: Int, defaultValue: (Int) -> Char): Char +public expect inline fun CharSequence.getOrElse(index: Int, defaultValue: (Int) -> Char): Char /** * Returns a character at the given [index] or `null` if the [index] is out of bounds of this char sequence. */ -public header fun CharSequence.getOrNull(index: Int): Char? +public expect fun CharSequence.getOrNull(index: Int): Char? /** * Returns index of the first character matching the given [predicate], or -1 if the char sequence does not contain such character. */ -public header inline fun CharSequence.indexOfFirst(predicate: (Char) -> Boolean): Int +public expect inline fun CharSequence.indexOfFirst(predicate: (Char) -> Boolean): Int /** * Returns index of the last character matching the given [predicate], or -1 if the char sequence does not contain such character. */ -public header inline fun CharSequence.indexOfLast(predicate: (Char) -> Boolean): Int +public expect inline fun CharSequence.indexOfLast(predicate: (Char) -> Boolean): Int /** * Returns the last character. * @throws [NoSuchElementException] if the char sequence is empty. */ -public header fun CharSequence.last(): Char +public expect fun CharSequence.last(): Char /** * Returns the last character matching the given [predicate]. * @throws [NoSuchElementException] if no such character is found. */ -public header inline fun CharSequence.last(predicate: (Char) -> Boolean): Char +public expect inline fun CharSequence.last(predicate: (Char) -> Boolean): Char /** * Returns the last character, or `null` if the char sequence is empty. */ -public header fun CharSequence.lastOrNull(): Char? +public expect fun CharSequence.lastOrNull(): Char? /** * Returns the last character matching the given [predicate], or `null` if no such character was found. */ -public header inline fun CharSequence.lastOrNull(predicate: (Char) -> Boolean): Char? +public expect inline fun CharSequence.lastOrNull(predicate: (Char) -> Boolean): Char? /** * Returns the single character, or throws an exception if the char sequence is empty or has more than one character. */ -public header fun CharSequence.single(): Char +public expect fun CharSequence.single(): Char /** * Returns the single character matching the given [predicate], or throws exception if there is no or more than one matching character. */ -public header inline fun CharSequence.single(predicate: (Char) -> Boolean): Char +public expect inline fun CharSequence.single(predicate: (Char) -> Boolean): Char /** * Returns single character, or `null` if the char sequence is empty or has more than one character. */ -public header fun CharSequence.singleOrNull(): Char? +public expect fun CharSequence.singleOrNull(): Char? /** * Returns the single character matching the given [predicate], or `null` if character was not found or more than one character was found. */ -public header inline fun CharSequence.singleOrNull(predicate: (Char) -> Boolean): Char? +public expect inline fun CharSequence.singleOrNull(predicate: (Char) -> Boolean): Char? /** * Returns a subsequence of this char sequence with the first [n] characters removed. */ -public header fun CharSequence.drop(n: Int): CharSequence +public expect fun CharSequence.drop(n: Int): CharSequence /** * Returns a string with the first [n] characters removed. */ -public header fun String.drop(n: Int): String +public expect fun String.drop(n: Int): String /** * Returns a subsequence of this char sequence with the last [n] characters removed. */ -public header fun CharSequence.dropLast(n: Int): CharSequence +public expect fun CharSequence.dropLast(n: Int): CharSequence /** * Returns a string with the last [n] characters removed. */ -public header fun String.dropLast(n: Int): String +public expect fun String.dropLast(n: Int): String /** * Returns a subsequence of this char sequence containing all characters except last characters that satisfy the given [predicate]. */ -public header inline fun CharSequence.dropLastWhile(predicate: (Char) -> Boolean): CharSequence +public expect inline fun CharSequence.dropLastWhile(predicate: (Char) -> Boolean): CharSequence /** * Returns a string containing all characters except last characters that satisfy the given [predicate]. */ -public header inline fun String.dropLastWhile(predicate: (Char) -> Boolean): String +public expect inline fun String.dropLastWhile(predicate: (Char) -> Boolean): String /** * Returns a subsequence of this char sequence containing all characters except first characters that satisfy the given [predicate]. */ -public header inline fun CharSequence.dropWhile(predicate: (Char) -> Boolean): CharSequence +public expect inline fun CharSequence.dropWhile(predicate: (Char) -> Boolean): CharSequence /** * Returns a string containing all characters except first characters that satisfy the given [predicate]. */ -public header inline fun String.dropWhile(predicate: (Char) -> Boolean): String +public expect inline fun String.dropWhile(predicate: (Char) -> Boolean): String /** * Returns a char sequence containing only those characters from the original char sequence that match the given [predicate]. */ -public header inline fun CharSequence.filter(predicate: (Char) -> Boolean): CharSequence +public expect inline fun CharSequence.filter(predicate: (Char) -> Boolean): CharSequence /** * Returns a string containing only those characters from the original string that match the given [predicate]. */ -public header inline fun String.filter(predicate: (Char) -> Boolean): String +public expect inline fun String.filter(predicate: (Char) -> Boolean): String /** * Returns a char sequence containing only those characters from the original char sequence 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 CharSequence.filterIndexed(predicate: (index: Int, Char) -> Boolean): CharSequence +public expect 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: (index: Int, Char) -> Boolean): String +public expect 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: (index: Int, Char) -> Boolean): C +public expect 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]. */ -public header inline fun CharSequence.filterNot(predicate: (Char) -> Boolean): CharSequence +public expect inline fun CharSequence.filterNot(predicate: (Char) -> Boolean): CharSequence /** * Returns a string containing only those characters from the original string that do not match the given [predicate]. */ -public header inline fun String.filterNot(predicate: (Char) -> Boolean): String +public expect inline fun String.filterNot(predicate: (Char) -> Boolean): String /** * Appends all characters not matching the given [predicate] to the given [destination]. */ -public header inline fun CharSequence.filterNotTo(destination: C, predicate: (Char) -> Boolean): C +public expect inline fun CharSequence.filterNotTo(destination: C, predicate: (Char) -> Boolean): C /** * Appends all characters matching the given [predicate] to the given [destination]. */ -public header inline fun CharSequence.filterTo(destination: C, predicate: (Char) -> Boolean): C +public expect inline fun CharSequence.filterTo(destination: C, predicate: (Char) -> Boolean): C /** * Returns a char sequence containing characters of the original char sequence at the specified range of [indices]. */ -public header fun CharSequence.slice(indices: IntRange): CharSequence +public expect fun CharSequence.slice(indices: IntRange): CharSequence /** * Returns a string containing characters of the original string at the specified range of [indices]. */ -public header fun String.slice(indices: IntRange): String +public expect fun String.slice(indices: IntRange): String /** * Returns a char sequence containing characters of the original char sequence at specified [indices]. */ -public header fun CharSequence.slice(indices: Iterable): CharSequence +public expect fun CharSequence.slice(indices: Iterable): CharSequence /** * Returns a string containing characters of the original string at specified [indices]. */ @kotlin.internal.InlineOnly -public header inline fun String.slice(indices: Iterable): String +public expect inline fun String.slice(indices: Iterable): String /** * Returns a subsequence of this char sequence containing the first [n] characters from this char sequence, or the entire char sequence if this char sequence is shorter. */ -public header fun CharSequence.take(n: Int): CharSequence +public expect fun CharSequence.take(n: Int): CharSequence /** * Returns a string containing the first [n] characters from this string, or the entire string if this string is shorter. */ -public header fun String.take(n: Int): String +public expect fun String.take(n: Int): String /** * Returns a subsequence of this char sequence containing the last [n] characters from this char sequence, or the entire char sequence if this char sequence is shorter. */ -public header fun CharSequence.takeLast(n: Int): CharSequence +public expect fun CharSequence.takeLast(n: Int): CharSequence /** * Returns a string containing the last [n] characters from this string, or the entire string if this string is shorter. */ -public header fun String.takeLast(n: Int): String +public expect fun String.takeLast(n: Int): String /** * Returns a subsequence of this char sequence containing last characters that satisfy the given [predicate]. */ -public header inline fun CharSequence.takeLastWhile(predicate: (Char) -> Boolean): CharSequence +public expect inline fun CharSequence.takeLastWhile(predicate: (Char) -> Boolean): CharSequence /** * Returns a string containing last characters that satisfy the given [predicate]. */ -public header inline fun String.takeLastWhile(predicate: (Char) -> Boolean): String +public expect inline fun String.takeLastWhile(predicate: (Char) -> Boolean): String /** * Returns a subsequence of this char sequence containing the first characters that satisfy the given [predicate]. */ -public header inline fun CharSequence.takeWhile(predicate: (Char) -> Boolean): CharSequence +public expect inline fun CharSequence.takeWhile(predicate: (Char) -> Boolean): CharSequence /** * Returns a string containing the first characters that satisfy the given [predicate]. */ -public header inline fun String.takeWhile(predicate: (Char) -> Boolean): String +public expect inline fun String.takeWhile(predicate: (Char) -> Boolean): String /** * Returns a char sequence with characters in reversed order. */ -public header fun CharSequence.reversed(): CharSequence +public expect fun CharSequence.reversed(): CharSequence /** * Returns a string with characters in reversed order. */ @kotlin.internal.InlineOnly -public header inline fun String.reversed(): String +public expect inline fun String.reversed(): String /** * Returns a [Map] containing key-value pairs provided by [transform] function @@ -296,7 +296,7 @@ public header inline fun String.reversed(): String * * The returned map preserves the entry iteration order of the original char sequence. */ -public header inline fun CharSequence.associate(transform: (Char) -> Pair): Map +public expect inline fun CharSequence.associate(transform: (Char) -> Pair): Map /** * Returns a [Map] containing the characters from the given char sequence indexed by the key @@ -306,7 +306,7 @@ public header inline fun CharSequence.associate(transform: (Char) -> Pair * * The returned map preserves the entry iteration order of the original char sequence. */ -public header inline fun CharSequence.associateBy(keySelector: (Char) -> K): Map +public expect inline fun CharSequence.associateBy(keySelector: (Char) -> K): Map /** * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to characters of the given char sequence. @@ -315,7 +315,7 @@ public header inline fun CharSequence.associateBy(keySelector: (Char) -> K): * * The returned map preserves the entry iteration order of the original char sequence. */ -public header inline fun CharSequence.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map +public expect inline fun CharSequence.associateBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -324,7 +324,7 @@ public header inline fun CharSequence.associateBy(keySelector: (Char) -> * * If any two characters would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > CharSequence.associateByTo(destination: M, keySelector: (Char) -> K): M +public expect inline fun > CharSequence.associateByTo(destination: M, keySelector: (Char) -> K): M /** * Populates and returns the [destination] mutable map with key-value pairs, @@ -333,7 +333,7 @@ public header inline fun > CharSequence.associa * * If any two characters would have the same key returned by [keySelector] the last one gets added to the map. */ -public header inline fun > CharSequence.associateByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M +public expect inline fun > CharSequence.associateByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M /** * Populates and returns the [destination] mutable map with key-value pairs @@ -341,44 +341,44 @@ public header inline fun > CharSequence.associa * * If any of two pairs would have the same key the last one gets added to the map. */ -public header inline fun > CharSequence.associateTo(destination: M, transform: (Char) -> Pair): M +public expect inline fun > CharSequence.associateTo(destination: M, transform: (Char) -> Pair): M /** * Appends all characters to the given [destination] collection. */ -public header fun > CharSequence.toCollection(destination: C): C +public expect fun > CharSequence.toCollection(destination: C): C /** * Returns a [HashSet] of all characters. */ -public header fun CharSequence.toHashSet(): HashSet +public expect fun CharSequence.toHashSet(): HashSet /** * Returns a [List] containing all characters. */ -public header fun CharSequence.toList(): List +public expect fun CharSequence.toList(): List /** * Returns a [MutableList] filled with all characters of this char sequence. */ -public header fun CharSequence.toMutableList(): MutableList +public expect fun CharSequence.toMutableList(): MutableList /** * Returns a [Set] of all characters. * * The returned set preserves the element iteration order of the original char sequence. */ -public header fun CharSequence.toSet(): Set +public expect fun CharSequence.toSet(): Set /** * Returns a single list of all elements yielded from results of [transform] function being invoked on each character of original char sequence. */ -public header inline fun CharSequence.flatMap(transform: (Char) -> Iterable): List +public expect inline fun CharSequence.flatMap(transform: (Char) -> Iterable): List /** * Appends all elements yielded from results of [transform] function being invoked on each character of original char sequence, to the given [destination]. */ -public header inline fun > CharSequence.flatMapTo(destination: C, transform: (Char) -> Iterable): C +public expect inline fun > CharSequence.flatMapTo(destination: C, transform: (Char) -> Iterable): C /** * Groups characters of the original char sequence by the key returned by the given [keySelector] function @@ -388,7 +388,7 @@ public header inline fun > CharSequence.flatMapTo * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun CharSequence.groupBy(keySelector: (Char) -> K): Map> +public expect inline fun CharSequence.groupBy(keySelector: (Char) -> K): Map> /** * Groups values returned by the [valueTransform] function applied to each character of the original char sequence @@ -399,7 +399,7 @@ public header inline fun CharSequence.groupBy(keySelector: (Char) -> K): Map * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun CharSequence.groupBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map> +public expect inline fun CharSequence.groupBy(keySelector: (Char) -> K, valueTransform: (Char) -> V): Map> /** * Groups characters of the original char sequence by the key returned by the given [keySelector] function @@ -409,7 +409,7 @@ public header inline fun CharSequence.groupBy(keySelector: (Char) -> K, v * * @sample samples.collections.Collections.Transformations.groupBy */ -public header inline fun >> CharSequence.groupByTo(destination: M, keySelector: (Char) -> K): M +public expect inline fun >> CharSequence.groupByTo(destination: M, keySelector: (Char) -> K): M /** * Groups values returned by the [valueTransform] function applied to each character of the original char sequence @@ -420,7 +420,7 @@ public header inline fun >> CharSequen * * @sample samples.collections.Collections.Transformations.groupByKeysAndValues */ -public header inline fun >> CharSequence.groupByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M +public expect inline fun >> CharSequence.groupByTo(destination: M, keySelector: (Char) -> K, valueTransform: (Char) -> V): M /** * Creates a [Grouping] source from a char sequence to be used later with one of group-and-fold operations @@ -429,13 +429,13 @@ public header inline fun >> CharSequen * @sample samples.collections.Collections.Transformations.groupingByEachCount */ @SinceKotlin("1.1") -public header inline fun CharSequence.groupingBy(crossinline keySelector: (Char) -> K): Grouping +public expect inline fun CharSequence.groupingBy(crossinline keySelector: (Char) -> K): Grouping /** * Returns a list containing the results of applying the given [transform] function * to each character in the original char sequence. */ -public header inline fun CharSequence.map(transform: (Char) -> R): List +public expect inline fun CharSequence.map(transform: (Char) -> R): List /** * Returns a list containing the results of applying the given [transform] function @@ -443,7 +443,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: (index: Int, Char) -> R): List +public expect 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 @@ -451,7 +451,7 @@ public header inline fun CharSequence.mapIndexed(transform: (index: Int, Cha * @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: (index: Int, Char) -> R?): List +public expect 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 @@ -459,7 +459,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: (index: Int, Char) -> R?): C +public expect 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 @@ -467,61 +467,61 @@ 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: (index: Int, Char) -> R): C +public expect 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 * to each character in the original char sequence. */ -public header inline fun CharSequence.mapNotNull(transform: (Char) -> R?): List +public expect inline fun CharSequence.mapNotNull(transform: (Char) -> R?): List /** * Applies the given [transform] function to each character in the original char sequence * and appends only the non-null results to the given [destination]. */ -public header inline fun > CharSequence.mapNotNullTo(destination: C, transform: (Char) -> R?): C +public expect inline fun > CharSequence.mapNotNullTo(destination: C, transform: (Char) -> R?): C /** * Applies the given [transform] function to each character of the original char sequence * and appends the results to the given [destination]. */ -public header inline fun > CharSequence.mapTo(destination: C, transform: (Char) -> R): C +public expect inline fun > CharSequence.mapTo(destination: C, transform: (Char) -> R): C /** * Returns a lazy [Iterable] of [IndexedValue] for each character of the original char sequence. */ -public header fun CharSequence.withIndex(): Iterable> +public expect fun CharSequence.withIndex(): Iterable> /** * Returns `true` if all characters match the given [predicate]. */ -public header inline fun CharSequence.all(predicate: (Char) -> Boolean): Boolean +public expect inline fun CharSequence.all(predicate: (Char) -> Boolean): Boolean /** * Returns `true` if char sequence has at least one character. */ -public header fun CharSequence.any(): Boolean +public expect fun CharSequence.any(): Boolean /** * Returns `true` if at least one character matches the given [predicate]. */ -public header inline fun CharSequence.any(predicate: (Char) -> Boolean): Boolean +public expect inline fun CharSequence.any(predicate: (Char) -> Boolean): Boolean /** * Returns the length of this char sequence. */ @kotlin.internal.InlineOnly -public header inline fun CharSequence.count(): Int +public expect inline fun CharSequence.count(): Int /** * Returns the number of characters matching the given [predicate]. */ -public header inline fun CharSequence.count(predicate: (Char) -> Boolean): Int +public expect 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: (acc: R, Char) -> R): R +public expect 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 @@ -529,12 +529,12 @@ public header inline fun CharSequence.fold(initial: R, operation: (acc: R, 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.foldIndexed(initial: R, operation: (index: Int, acc: R, Char) -> R): R +public expect 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, acc: R) -> R): R +public expect 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 @@ -542,70 +542,70 @@ 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: (index: Int, Char, acc: R) -> R): R +public expect inline fun CharSequence.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R /** * Performs the given [action] on each character. */ -public header inline fun CharSequence.forEach(action: (Char) -> Unit): Unit +public expect inline fun CharSequence.forEach(action: (Char) -> Unit): Unit /** * Performs the given [action] on each character, providing sequential index with the character. * @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: (index: Int, Char) -> Unit): Unit +public expect inline fun CharSequence.forEachIndexed(action: (index: Int, Char) -> Unit): Unit /** * Returns the largest character or `null` if there are no characters. */ -public header fun CharSequence.max(): Char? +public expect fun CharSequence.max(): Char? /** * Returns the first character yielding the largest value of the given function or `null` if there are no characters. */ -public header inline fun > CharSequence.maxBy(selector: (Char) -> R): Char? +public expect inline fun > CharSequence.maxBy(selector: (Char) -> R): Char? /** * Returns the first character having the largest value according to the provided [comparator] or `null` if there are no characters. */ -public header fun CharSequence.maxWith(comparator: Comparator): Char? +public expect fun CharSequence.maxWith(comparator: Comparator): Char? /** * Returns the smallest character or `null` if there are no characters. */ -public header fun CharSequence.min(): Char? +public expect fun CharSequence.min(): Char? /** * Returns the first character yielding the smallest value of the given function or `null` if there are no characters. */ -public header inline fun > CharSequence.minBy(selector: (Char) -> R): Char? +public expect inline fun > CharSequence.minBy(selector: (Char) -> R): Char? /** * Returns the first character having the smallest value according to the provided [comparator] or `null` if there are no characters. */ -public header fun CharSequence.minWith(comparator: Comparator): Char? +public expect fun CharSequence.minWith(comparator: Comparator): Char? /** * Returns `true` if the char sequence has no characters. */ -public header fun CharSequence.none(): Boolean +public expect fun CharSequence.none(): Boolean /** * Returns `true` if no characters match the given [predicate]. */ -public header inline fun CharSequence.none(predicate: (Char) -> Boolean): Boolean +public expect inline fun CharSequence.none(predicate: (Char) -> Boolean): Boolean /** * Performs the given [action] on each character and returns the char sequence itself afterwards. */ @SinceKotlin("1.1") -public header inline fun S.onEach(action: (Char) -> Unit): S +public expect 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: (acc: Char, Char) -> Char): Char +public expect inline fun CharSequence.reduce(operation: (acc: Char, Char) -> Char): Char /** * Accumulates value starting with the first character and applying [operation] from left to right @@ -613,12 +613,12 @@ public header inline fun CharSequence.reduce(operation: (acc: Char, Char) -> Cha * @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: (index: Int, acc: Char, Char) -> Char): Char +public expect 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, acc: Char) -> Char): Char +public expect inline fun CharSequence.reduceRight(operation: (Char, acc: Char) -> Char): Char /** * Accumulates value starting with last character and applying [operation] from right to left @@ -626,49 +626,49 @@ public header inline fun CharSequence.reduceRight(operation: (Char, acc: 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.reduceRightIndexed(operation: (index: Int, Char, acc: Char) -> Char): Char +public expect 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. */ -public header inline fun CharSequence.sumBy(selector: (Char) -> Int): Int +public expect inline fun CharSequence.sumBy(selector: (Char) -> Int): Int /** * Returns the sum of all values produced by [selector] function applied to each character in the char sequence. */ -public header inline fun CharSequence.sumByDouble(selector: (Char) -> Double): Double +public expect inline fun CharSequence.sumByDouble(selector: (Char) -> Double): Double /** * Splits the original char sequence into pair of char sequences, * where *first* char sequence contains characters for which [predicate] yielded `true`, * while *second* char sequence contains characters for which [predicate] yielded `false`. */ -public header inline fun CharSequence.partition(predicate: (Char) -> Boolean): Pair +public expect inline fun CharSequence.partition(predicate: (Char) -> Boolean): Pair /** * Splits the original string into pair of strings, * where *first* string contains characters for which [predicate] yielded `true`, * while *second* string contains characters for which [predicate] yielded `false`. */ -public header inline fun String.partition(predicate: (Char) -> Boolean): Pair +public expect inline fun String.partition(predicate: (Char) -> Boolean): Pair /** * Returns a list of pairs built from characters of both char sequences with same indexes. List has length of shortest char sequence. */ -public header infix fun CharSequence.zip(other: CharSequence): List> +public expect 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 header inline fun CharSequence.zip(other: CharSequence, transform: (a: Char, b: Char) -> V): List +public expect 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. */ -public header fun CharSequence.asIterable(): Iterable +public expect fun CharSequence.asIterable(): Iterable /** * Creates a [Sequence] instance that wraps the original char sequence returning its characters when being iterated. */ -public header fun CharSequence.asSequence(): Sequence +public expect fun CharSequence.asSequence(): Sequence diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/engine/Engine.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/engine/Engine.kt index 896569e59a7..f1f299037c8 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/engine/Engine.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/engine/Engine.kt @@ -491,7 +491,7 @@ class GenericFunction(val signature: String, val keyword: String = "fun") { builder.append(visibility[f] ?: "public").append(' ') if (headerOnly && !hasOptionalParams) { - builder.append("header ") + builder.append("expect ") } if (external[platform, f] == true) builder.append("external ")