Get rid of platform differences in MutableList.sort() doc
This commit is contained in:
committed by
Space
parent
225be54c61
commit
a9946b01e6
@@ -9,6 +9,8 @@ package kotlin.collections
|
||||
* Sorts elements in the list in-place according to their natural sort order.
|
||||
*
|
||||
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
|
||||
*
|
||||
* @sample samples.collections.Collections.Sorting.sortMutableList
|
||||
*/
|
||||
public actual fun <T : Comparable<T>> MutableList<T>.sort(): Unit = sortWith(naturalOrder())
|
||||
|
||||
|
||||
@@ -148,6 +148,8 @@ public actual fun <T> Iterable<T>.shuffled(): List<T> = toMutableList().apply {
|
||||
* Sorts elements in the list in-place according to their natural sort order.
|
||||
*
|
||||
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
|
||||
*
|
||||
* @sample samples.collections.Collections.Sorting.sortMutableList
|
||||
*/
|
||||
public actual fun <T : Comparable<T>> MutableList<T>.sort(): Unit {
|
||||
collectionsSort(this, naturalOrder())
|
||||
|
||||
Reference in New Issue
Block a user