Provide java.util.Collections#shuffle as extensions for collections in JS
#KT-2460
This commit is contained in:
committed by
Ilya Gorbunov
parent
6fc87c532e
commit
e640867238
@@ -149,10 +149,12 @@ expect inline fun <reified T> Array<out T>?.orEmpty(): Array<out T>
|
||||
|
||||
expect inline fun <reified T> Collection<T>.toTypedArray(): Array<T>
|
||||
|
||||
@SinceKotlin("1.2")
|
||||
expect fun <T> MutableList<T>.fill(value: T): Unit
|
||||
expect fun <T : Comparable<T>> MutableList<T>.sort(): Unit
|
||||
expect fun <T> MutableList<T>.sortWith(comparator: Comparator<in T>): Unit
|
||||
@SinceKotlin("1.2") header fun <T> MutableList<T>.fill(value: T): Unit
|
||||
@SinceKotlin("1.2") header fun <T> MutableList<T>.shuffle(): Unit
|
||||
@SinceKotlin("1.2") header fun <T> Iterable<T>.shuffled(): List<T>
|
||||
|
||||
header fun <T : Comparable<T>> MutableList<T>.sort(): Unit
|
||||
header fun <T> MutableList<T>.sortWith(comparator: Comparator<in T>): Unit
|
||||
|
||||
|
||||
// from Grouping.kt
|
||||
|
||||
Reference in New Issue
Block a user