Generate 'chunked' and 'windowed' signatures and delegating implementations
Add implementations of windowed.
This commit is contained in:
@@ -898,6 +898,12 @@ public expect fun <T : Any> Iterable<T?>.requireNoNulls(): Iterable<T>
|
||||
*/
|
||||
public expect fun <T : Any> List<T?>.requireNoNulls(): List<T>
|
||||
|
||||
@SinceKotlin("1.2")
|
||||
public expect fun <T> Iterable<T>.chunked(size: Int): List<List<T>>
|
||||
|
||||
@SinceKotlin("1.2")
|
||||
public expect fun <T, R> Iterable<T>.chunked(size: Int, transform: (List<T>) -> R): List<R>
|
||||
|
||||
/**
|
||||
* Returns a list containing all elements of the original collection without the first occurrence of the given [element].
|
||||
*/
|
||||
@@ -989,6 +995,12 @@ public expect inline fun <T> Iterable<T>.plusElement(element: T): List<T>
|
||||
@kotlin.internal.InlineOnly
|
||||
public expect inline fun <T> Collection<T>.plusElement(element: T): List<T>
|
||||
|
||||
@SinceKotlin("1.2")
|
||||
public expect fun <T> Iterable<T>.windowed(size: Int, step: Int): List<List<T>>
|
||||
|
||||
@SinceKotlin("1.2")
|
||||
public expect fun <T, R> Iterable<T>.windowed(size: Int, step: Int, transform: (List<T>) -> R): List<R>
|
||||
|
||||
/**
|
||||
* Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user