diff --git a/libraries/stdlib/api/js-v1/kotlin.collections.kt b/libraries/stdlib/api/js-v1/kotlin.collections.kt index 5386dedee7b..ddbe6bc5520 100644 --- a/libraries/stdlib/api/js-v1/kotlin.collections.kt +++ b/libraries/stdlib/api/js-v1/kotlin.collections.kt @@ -8853,84 +8853,140 @@ public fun kotlin.collections.Iterable.sum(): kotlin.ULong @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class}) public fun kotlin.collections.Iterable.sum(): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.Array.sumBy(selector: (T) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.BooleanArray.sumBy(selector: (kotlin.Boolean) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ByteArray.sumBy(selector: (kotlin.Byte) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharArray.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.DoubleArray.sumBy(selector: (kotlin.Double) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.FloatArray.sumBy(selector: (kotlin.Float) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.IntArray.sumBy(selector: (kotlin.Int) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.LongArray.sumBy(selector: (kotlin.Long) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ShortArray.sumBy(selector: (kotlin.Short) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UByteArray.sumBy(selector: (kotlin.UByte) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UIntArray.sumBy(selector: (kotlin.UInt) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.ULongArray.sumBy(selector: (kotlin.ULong) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UShortArray.sumBy(selector: (kotlin.UShort) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.collections.Iterable.sumBy(selector: (T) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.Array.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.BooleanArray.sumByDouble(selector: (kotlin.Boolean) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ByteArray.sumByDouble(selector: (kotlin.Byte) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharArray.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.DoubleArray.sumByDouble(selector: (kotlin.Double) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.FloatArray.sumByDouble(selector: (kotlin.Float) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.IntArray.sumByDouble(selector: (kotlin.Int) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.LongArray.sumByDouble(selector: (kotlin.Long) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ShortArray.sumByDouble(selector: (kotlin.Short) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UByteArray.sumByDouble(selector: (kotlin.UByte) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UIntArray.sumByDouble(selector: (kotlin.UInt) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.ULongArray.sumByDouble(selector: (kotlin.ULong) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UShortArray.sumByDouble(selector: (kotlin.UShort) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.collections.Iterable.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/api/js-v1/kotlin.sequences.kt b/libraries/stdlib/api/js-v1/kotlin.sequences.kt index e4c1a4fbbc6..9db773117fb 100644 --- a/libraries/stdlib/api/js-v1/kotlin.sequences.kt +++ b/libraries/stdlib/api/js-v1/kotlin.sequences.kt @@ -541,8 +541,12 @@ public fun kotlin.sequences.Sequence.sum(): kotlin.ULong @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class}) public fun kotlin.sequences.Sequence.sum(): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.sequences.Sequence.sumBy(selector: (T) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.sequences.Sequence.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/api/js-v1/kotlin.text.kt b/libraries/stdlib/api/js-v1/kotlin.text.kt index 59d6ef9290c..1228d5a84b0 100644 --- a/libraries/stdlib/api/js-v1/kotlin.text.kt +++ b/libraries/stdlib/api/js-v1/kotlin.text.kt @@ -879,8 +879,12 @@ public fun kotlin.String.substringBeforeLast(delimiter: kotlin.Char, missingDeli public fun kotlin.String.substringBeforeLast(delimiter: kotlin.String, missingDelimiterValue: kotlin.String = ...): kotlin.String +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharSequence.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharSequence.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/api/js/kotlin.collections.kt b/libraries/stdlib/api/js/kotlin.collections.kt index a5b70324c6d..3d0f0f15867 100644 --- a/libraries/stdlib/api/js/kotlin.collections.kt +++ b/libraries/stdlib/api/js/kotlin.collections.kt @@ -8817,84 +8817,140 @@ public fun kotlin.collections.Iterable.sum(): kotlin.ULong @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class}) public fun kotlin.collections.Iterable.sum(): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.Array.sumBy(selector: (T) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.BooleanArray.sumBy(selector: (kotlin.Boolean) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ByteArray.sumBy(selector: (kotlin.Byte) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharArray.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.DoubleArray.sumBy(selector: (kotlin.Double) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.FloatArray.sumBy(selector: (kotlin.Float) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.IntArray.sumBy(selector: (kotlin.Int) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.LongArray.sumBy(selector: (kotlin.Long) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ShortArray.sumBy(selector: (kotlin.Short) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UByteArray.sumBy(selector: (kotlin.UByte) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UIntArray.sumBy(selector: (kotlin.UInt) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.ULongArray.sumBy(selector: (kotlin.ULong) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UShortArray.sumBy(selector: (kotlin.UShort) -> kotlin.UInt): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.collections.Iterable.sumBy(selector: (T) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.Array.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.BooleanArray.sumByDouble(selector: (kotlin.Boolean) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ByteArray.sumByDouble(selector: (kotlin.Byte) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharArray.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.DoubleArray.sumByDouble(selector: (kotlin.Double) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.FloatArray.sumByDouble(selector: (kotlin.Float) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.IntArray.sumByDouble(selector: (kotlin.Int) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.LongArray.sumByDouble(selector: (kotlin.Long) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.ShortArray.sumByDouble(selector: (kotlin.Short) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UByteArray.sumByDouble(selector: (kotlin.UByte) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UIntArray.sumByDouble(selector: (kotlin.UInt) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.ULongArray.sumByDouble(selector: (kotlin.ULong) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") @kotlin.SinceKotlin(version = "1.3") @kotlin.ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun kotlin.UShortArray.sumByDouble(selector: (kotlin.UShort) -> kotlin.Double): kotlin.Double +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.collections.Iterable.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/api/js/kotlin.sequences.kt b/libraries/stdlib/api/js/kotlin.sequences.kt index e4c1a4fbbc6..9db773117fb 100644 --- a/libraries/stdlib/api/js/kotlin.sequences.kt +++ b/libraries/stdlib/api/js/kotlin.sequences.kt @@ -541,8 +541,12 @@ public fun kotlin.sequences.Sequence.sum(): kotlin.ULong @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class}) public fun kotlin.sequences.Sequence.sum(): kotlin.UInt +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.sequences.Sequence.sumBy(selector: (T) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.sequences.Sequence.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/api/js/kotlin.text.kt b/libraries/stdlib/api/js/kotlin.text.kt index 59d6ef9290c..1228d5a84b0 100644 --- a/libraries/stdlib/api/js/kotlin.text.kt +++ b/libraries/stdlib/api/js/kotlin.text.kt @@ -879,8 +879,12 @@ public fun kotlin.String.substringBeforeLast(delimiter: kotlin.Char, missingDeli public fun kotlin.String.substringBeforeLast(delimiter: kotlin.String, missingDelimiterValue: kotlin.String = ...): kotlin.String +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharSequence.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int +@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {})) +@kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public inline fun kotlin.CharSequence.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/common/src/generated/_Arrays.kt b/libraries/stdlib/common/src/generated/_Arrays.kt index 911126608c2..a9cb9c6ab1f 100644 --- a/libraries/stdlib/common/src/generated/_Arrays.kt +++ b/libraries/stdlib/common/src/generated/_Arrays.kt @@ -21153,6 +21153,8 @@ public inline fun CharArray.scanIndexed(initial: R, operation: (index: Int, /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun Array.sumBy(selector: (T) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21164,6 +21166,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21175,6 +21179,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun ShortArray.sumBy(selector: (Short) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21186,6 +21192,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun IntArray.sumBy(selector: (Int) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21197,6 +21205,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun LongArray.sumBy(selector: (Long) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21208,6 +21218,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun FloatArray.sumBy(selector: (Float) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21219,6 +21231,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun DoubleArray.sumBy(selector: (Double) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21230,6 +21244,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun BooleanArray.sumBy(selector: (Boolean) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21241,6 +21257,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun CharArray.sumBy(selector: (Char) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -21252,6 +21270,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun Array.sumByDouble(selector: (T) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21263,6 +21283,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun ByteArray.sumByDouble(selector: (Byte) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21274,6 +21296,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun ShortArray.sumByDouble(selector: (Short) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21285,6 +21309,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun IntArray.sumByDouble(selector: (Int) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21296,6 +21322,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun LongArray.sumByDouble(selector: (Long) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21307,6 +21335,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun FloatArray.sumByDouble(selector: (Float) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21318,6 +21348,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun DoubleArray.sumByDouble(selector: (Double) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21329,6 +21361,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun BooleanArray.sumByDouble(selector: (Boolean) -> Double): Double { var sum: Double = 0.0 for (element in this) { @@ -21340,6 +21374,8 @@ public inline fun BooleanArray.sumByDouble(selector: (Boolean) -> Double): Doubl /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun CharArray.sumByDouble(selector: (Char) -> Double): Double { var sum: Double = 0.0 for (element in this) { diff --git a/libraries/stdlib/common/src/generated/_Collections.kt b/libraries/stdlib/common/src/generated/_Collections.kt index f74d5f9657e..25c86f27a83 100644 --- a/libraries/stdlib/common/src/generated/_Collections.kt +++ b/libraries/stdlib/common/src/generated/_Collections.kt @@ -2814,6 +2814,8 @@ public inline fun Iterable.scanIndexed(initial: R, operation: (index: /** * Returns the sum of all values produced by [selector] function applied to each element in the collection. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun Iterable.sumBy(selector: (T) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -2825,6 +2827,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun Iterable.sumByDouble(selector: (T) -> Double): Double { var sum: Double = 0.0 for (element in this) { diff --git a/libraries/stdlib/common/src/generated/_Sequences.kt b/libraries/stdlib/common/src/generated/_Sequences.kt index db451aed0cc..2b395a3e894 100644 --- a/libraries/stdlib/common/src/generated/_Sequences.kt +++ b/libraries/stdlib/common/src/generated/_Sequences.kt @@ -2257,6 +2257,8 @@ public fun Sequence.scanIndexed(initial: R, operation: (index: Int, ac * * The operation is _terminal_. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun Sequence.sumBy(selector: (T) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -2270,6 +2272,8 @@ public inline fun Sequence.sumBy(selector: (T) -> Int): Int { * * The operation is _terminal_. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun Sequence.sumByDouble(selector: (T) -> Double): Double { var sum: Double = 0.0 for (element in this) { diff --git a/libraries/stdlib/common/src/generated/_Strings.kt b/libraries/stdlib/common/src/generated/_Strings.kt index 944c42ba574..9fed56f3c51 100644 --- a/libraries/stdlib/common/src/generated/_Strings.kt +++ b/libraries/stdlib/common/src/generated/_Strings.kt @@ -2003,6 +2003,8 @@ public inline fun CharSequence.scanIndexed(initial: R, operation: (index: In /** * Returns the sum of all values produced by [selector] function applied to each character in the char sequence. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun CharSequence.sumBy(selector: (Char) -> Int): Int { var sum: Int = 0 for (element in this) { @@ -2014,6 +2016,8 @@ public 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. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") public inline fun CharSequence.sumByDouble(selector: (Char) -> Double): Double { var sum: Double = 0.0 for (element in this) { diff --git a/libraries/stdlib/common/src/generated/_UArrays.kt b/libraries/stdlib/common/src/generated/_UArrays.kt index 48c2179c17c..bc1f877867e 100644 --- a/libraries/stdlib/common/src/generated/_UArrays.kt +++ b/libraries/stdlib/common/src/generated/_UArrays.kt @@ -9549,6 +9549,8 @@ public inline fun UShortArray.scanIndexed(initial: R, operation: (index: Int /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9563,6 +9565,8 @@ public inline fun UIntArray.sumBy(selector: (UInt) -> UInt): UInt { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9577,6 +9581,8 @@ public inline fun ULongArray.sumBy(selector: (ULong) -> UInt): UInt { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9591,6 +9597,8 @@ public inline fun UByteArray.sumBy(selector: (UByte) -> UInt): UInt { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9605,6 +9613,8 @@ public inline fun UShortArray.sumBy(selector: (UShort) -> UInt): UInt { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9619,6 +9629,8 @@ public inline fun UIntArray.sumByDouble(selector: (UInt) -> Double): Double { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9633,6 +9645,8 @@ public inline fun ULongArray.sumByDouble(selector: (ULong) -> Double): Double { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -9647,6 +9661,8 @@ public inline fun UByteArray.sumByDouble(selector: (UByte) -> Double): Double { /** * Returns the sum of all values produced by [selector] function applied to each element in the array. */ +@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)")) +@DeprecatedSinceKotlin(warningSince = "1.5") @SinceKotlin("1.3") @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly @@ -10489,7 +10505,7 @@ public inline fun ULongArray.sum(): ULong { @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun UByteArray.sum(): UInt { - return sumBy { it.toUInt() } + return sumOf { it.toUInt() } } /** @@ -10499,6 +10515,6 @@ public inline fun UByteArray.sum(): UInt { @ExperimentalUnsignedTypes @kotlin.internal.InlineOnly public inline fun UShortArray.sum(): UInt { - return sumBy { it.toUInt() } + return sumOf { it.toUInt() } } diff --git a/libraries/stdlib/src/kotlin/collections/Arrays.kt b/libraries/stdlib/src/kotlin/collections/Arrays.kt index fe2e6bd2a93..9a1f0e1eac6 100644 --- a/libraries/stdlib/src/kotlin/collections/Arrays.kt +++ b/libraries/stdlib/src/kotlin/collections/Arrays.kt @@ -17,7 +17,7 @@ import kotlin.contracts.* * @sample samples.collections.Arrays.Transformations.flattenArray */ public fun Array>.flatten(): List { - val result = ArrayList(sumBy { it.size }) + val result = ArrayList(sumOf { it.size }) for (element in this) { result.addAll(element) } diff --git a/libraries/stdlib/test/collections/IterableTests.kt b/libraries/stdlib/test/collections/IterableTests.kt index 5b215343c70..4e33076ac26 100644 --- a/libraries/stdlib/test/collections/IterableTests.kt +++ b/libraries/stdlib/test/collections/IterableTests.kt @@ -417,6 +417,7 @@ abstract class IterableTests>(val createFrom: (Array 1uL }) } + @Suppress("DEPRECATION") @Test fun sumBy() { assertEquals(3u, ubyteArrayOf(0, 1, 2).sumBy { it.toUInt() }) @@ -335,6 +336,7 @@ class UnsignedArraysTest { assertEquals(6u, ulongArrayOf(2, 3, 4).sumBy { (it - 1u).toUInt() }) } + @Suppress("DEPRECATION") @Test fun sumByDouble() { assertEquals(3.0, ubyteArrayOf(0, 1, 2).sumByDouble { it.toDouble() }) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt index 328b727085c..8a35bd94891 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Aggregates.kt @@ -221,6 +221,8 @@ object Aggregates : TemplateGroupBase() { includeDefault() include(CharSequences, ArraysOfUnsigned) } builder { + deprecate(Deprecation("Use sumOf instead.", "this.sumOf(selector)", DeprecationLevel.WARNING, warningSince = "1.5")) + inline() doc { "Returns the sum of all values produced by [selector] function applied to each ${f.element} in the ${f.collection}." } returns("Int") @@ -291,6 +293,8 @@ object Aggregates : TemplateGroupBase() { includeDefault() include(CharSequences, ArraysOfUnsigned) } builder { + deprecate(Deprecation("Use sumOf instead.", "this.sumOf(selector)", DeprecationLevel.WARNING, warningSince = "1.5")) + inline() specialFor(ArraysOfUnsigned) { inlineOnly() } diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Numeric.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Numeric.kt index 3c286262edc..3caad438808 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Numeric.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Numeric.kt @@ -39,7 +39,7 @@ object Numeric : TemplateGroupBase() { if (p == p.sumType()) "return storage.sum().to${p.sumType().name}()" else - "return sumBy { it.to${p.sumType().name}() }" + "return sumOf { it.to${p.sumType().name}() }" } } specialFor(Iterables, Sequences, ArraysOfObjects, ArraysOfPrimitives) {