Specify names for parameters of functional types with two or more parameters to ease lambda completion.
#KT-13826
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -284,14 +284,14 @@ public header inline fun <T> Iterable<T>.filter(predicate: (T) -> Boolean): List
|
||||
* @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 <T> Iterable<T>.filterIndexed(predicate: (Int, T) -> Boolean): List<T>
|
||||
public header inline fun <T> Iterable<T>.filterIndexed(predicate: (index: Int, T) -> Boolean): List<T>
|
||||
|
||||
/**
|
||||
* 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 <T, C : MutableCollection<in T>> Iterable<T>.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C
|
||||
public header inline fun <T, C : MutableCollection<in T>> Iterable<T>.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C
|
||||
|
||||
/**
|
||||
* Returns a list containing all elements that are instances of specified type parameter R.
|
||||
@@ -608,7 +608,7 @@ public header inline fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R>
|
||||
* and returns the result of the transform applied to the element.
|
||||
*/
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
public header inline fun <T, R> Iterable<T>.mapIndexed(transform: (Int, T) -> R): List<R>
|
||||
public header inline fun <T, R> Iterable<T>.mapIndexed(transform: (index: Int, T) -> R): List<R>
|
||||
|
||||
/**
|
||||
* Returns a list containing only the non-null results of applying the given [transform] function
|
||||
@@ -616,7 +616,7 @@ public header inline fun <T, R> Iterable<T>.mapIndexed(transform: (Int, T) -> R)
|
||||
* @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 <T, R : Any> Iterable<T>.mapIndexedNotNull(transform: (Int, T) -> R?): List<R>
|
||||
public header inline fun <T, R : Any> Iterable<T>.mapIndexedNotNull(transform: (index: Int, T) -> R?): List<R>
|
||||
|
||||
/**
|
||||
* Applies the given [transform] function to each element and its index in the original collection
|
||||
@@ -624,7 +624,7 @@ public header inline fun <T, R : Any> Iterable<T>.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 <T, R : Any, C : MutableCollection<in R>> Iterable<T>.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C
|
||||
public header inline fun <T, R : Any, C : MutableCollection<in R>> Iterable<T>.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C
|
||||
|
||||
/**
|
||||
* Applies the given [transform] function to each element and its index in the original collection
|
||||
@@ -632,7 +632,7 @@ public header inline fun <T, R : Any, C : MutableCollection<in R>> Iterable<T>.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 <T, R, C : MutableCollection<in R>> Iterable<T>.mapIndexedTo(destination: C, transform: (Int, T) -> R): C
|
||||
public header inline fun <T, R, C : MutableCollection<in R>> Iterable<T>.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C
|
||||
|
||||
/**
|
||||
* Returns a list containing only the non-null results of applying the given [transform] function
|
||||
@@ -736,7 +736,7 @@ public header inline fun <T> Iterable<T>.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 <T, R> Iterable<T>.fold(initial: R, operation: (R, T) -> R): R
|
||||
public header inline fun <T, R> Iterable<T>.fold(initial: R, operation: (acc: R, T) -> R): R
|
||||
|
||||
/**
|
||||
* Accumulates value starting with [initial] value and applying [operation] from left to right
|
||||
@@ -744,12 +744,12 @@ public header inline fun <T, R> Iterable<T>.fold(initial: R, operation: (R, 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 <T, R> Iterable<T>.foldIndexed(initial: R, operation: (Int, R, T) -> R): R
|
||||
public header inline fun <T, R> Iterable<T>.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 <T, R> List<T>.foldRight(initial: R, operation: (T, R) -> R): R
|
||||
public header inline fun <T, R> List<T>.foldRight(initial: R, operation: (T, acc: R) -> R): R
|
||||
|
||||
/**
|
||||
* Accumulates value starting with [initial] value and applying [operation] from right to left
|
||||
@@ -757,7 +757,7 @@ public header inline fun <T, R> List<T>.foldRight(initial: R, operation: (T, R)
|
||||
* @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 <T, R> List<T>.foldRightIndexed(initial: R, operation: (Int, T, R) -> R): R
|
||||
public header inline fun <T, R> List<T>.foldRightIndexed(initial: R, operation: (index: Int, T, acc: R) -> R): R
|
||||
|
||||
/**
|
||||
* Performs the given [action] on each element.
|
||||
@@ -770,7 +770,7 @@ public header inline fun <T> Iterable<T>.forEach(action: (T) -> Unit): Unit
|
||||
* @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 <T> Iterable<T>.forEachIndexed(action: (Int, T) -> Unit): Unit
|
||||
public header inline fun <T> Iterable<T>.forEachIndexed(action: (index: Int, T) -> Unit): Unit
|
||||
|
||||
/**
|
||||
* Returns the largest element or `null` if there are no elements.
|
||||
@@ -853,7 +853,7 @@ public header inline fun <T, C : Iterable<T>> 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 <S, T: S> Iterable<T>.reduce(operation: (S, T) -> S): S
|
||||
public header inline fun <S, T: S> Iterable<T>.reduce(operation: (acc: S, T) -> S): S
|
||||
|
||||
/**
|
||||
* Accumulates value starting with the first element and applying [operation] from left to right
|
||||
@@ -861,12 +861,12 @@ public header inline fun <S, T: S> Iterable<T>.reduce(operation: (S, T) -> S): 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 <S, T: S> Iterable<T>.reduceIndexed(operation: (Int, S, T) -> S): S
|
||||
public header inline fun <S, T: S> Iterable<T>.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 <S, T: S> List<T>.reduceRight(operation: (T, S) -> S): S
|
||||
public header inline fun <S, T: S> List<T>.reduceRight(operation: (T, acc: S) -> S): S
|
||||
|
||||
/**
|
||||
* Accumulates value starting with last element and applying [operation] from right to left
|
||||
@@ -874,7 +874,7 @@ public header inline fun <S, T: S> List<T>.reduceRight(operation: (T, S) -> 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 <S, T: S> List<T>.reduceRightIndexed(operation: (Int, T, S) -> S): S
|
||||
public header inline fun <S, T: S> List<T>.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.
|
||||
@@ -989,7 +989,7 @@ public header infix fun <T, R> Iterable<T>.zip(other: Array<out R>): List<Pair<T
|
||||
/**
|
||||
* 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 <T, R, V> Iterable<T>.zip(other: Array<out R>, transform: (T, R) -> V): List<V>
|
||||
public header inline fun <T, R, V> Iterable<T>.zip(other: Array<out R>, transform: (a: T, b: R) -> V): List<V>
|
||||
|
||||
/**
|
||||
* Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection.
|
||||
@@ -999,7 +999,7 @@ public header infix fun <T, R> Iterable<T>.zip(other: Iterable<R>): List<Pair<T,
|
||||
/**
|
||||
* 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 <T, R, V> Iterable<T>.zip(other: Iterable<R>, transform: (T, R) -> V): List<V>
|
||||
public header inline fun <T, R, V> Iterable<T>.zip(other: Iterable<R>, transform: (a: T, b: R) -> V): List<V>
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
|
||||
@@ -146,14 +146,14 @@ public header fun <T> Sequence<T>.filter(predicate: (T) -> Boolean): Sequence<T>
|
||||
* @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 fun <T> Sequence<T>.filterIndexed(predicate: (Int, T) -> Boolean): Sequence<T>
|
||||
public header fun <T> Sequence<T>.filterIndexed(predicate: (index: Int, T) -> Boolean): Sequence<T>
|
||||
|
||||
/**
|
||||
* 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 <T, C : MutableCollection<in T>> Sequence<T>.filterIndexedTo(destination: C, predicate: (Int, T) -> Boolean): C
|
||||
public header inline fun <T, C : MutableCollection<in T>> Sequence<T>.filterIndexedTo(destination: C, predicate: (index: Int, T) -> Boolean): C
|
||||
|
||||
/**
|
||||
* Returns a sequence containing all elements that are instances of specified type parameter R.
|
||||
@@ -378,7 +378,7 @@ public header fun <T, R> Sequence<T>.map(transform: (T) -> R): Sequence<R>
|
||||
* @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 fun <T, R> Sequence<T>.mapIndexed(transform: (Int, T) -> R): Sequence<R>
|
||||
public header fun <T, R> Sequence<T>.mapIndexed(transform: (index: Int, T) -> R): Sequence<R>
|
||||
|
||||
/**
|
||||
* Returns a sequence containing only the non-null results of applying the given [transform] function
|
||||
@@ -386,7 +386,7 @@ public header fun <T, R> Sequence<T>.mapIndexed(transform: (Int, T) -> R): Seque
|
||||
* @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 fun <T, R : Any> Sequence<T>.mapIndexedNotNull(transform: (Int, T) -> R?): Sequence<R>
|
||||
public header fun <T, R : Any> Sequence<T>.mapIndexedNotNull(transform: (index: Int, T) -> R?): Sequence<R>
|
||||
|
||||
/**
|
||||
* Applies the given [transform] function to each element and its index in the original sequence
|
||||
@@ -394,7 +394,7 @@ public header fun <T, R : Any> Sequence<T>.mapIndexedNotNull(transform: (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 <T, R : Any, C : MutableCollection<in R>> Sequence<T>.mapIndexedNotNullTo(destination: C, transform: (Int, T) -> R?): C
|
||||
public header inline fun <T, R : Any, C : MutableCollection<in R>> Sequence<T>.mapIndexedNotNullTo(destination: C, transform: (index: Int, T) -> R?): C
|
||||
|
||||
/**
|
||||
* Applies the given [transform] function to each element and its index in the original sequence
|
||||
@@ -402,7 +402,7 @@ public header inline fun <T, R : Any, C : MutableCollection<in R>> Sequence<T>.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 <T, R, C : MutableCollection<in R>> Sequence<T>.mapIndexedTo(destination: C, transform: (Int, T) -> R): C
|
||||
public header inline fun <T, R, C : MutableCollection<in R>> Sequence<T>.mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C
|
||||
|
||||
/**
|
||||
* Returns a sequence containing only the non-null results of applying the given [transform] function
|
||||
@@ -477,7 +477,7 @@ public header inline fun <T> Sequence<T>.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 <T, R> Sequence<T>.fold(initial: R, operation: (R, T) -> R): R
|
||||
public header inline fun <T, R> Sequence<T>.fold(initial: R, operation: (acc: R, T) -> R): R
|
||||
|
||||
/**
|
||||
* Accumulates value starting with [initial] value and applying [operation] from left to right
|
||||
@@ -485,7 +485,7 @@ public header inline fun <T, R> Sequence<T>.fold(initial: R, operation: (R, 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 <T, R> Sequence<T>.foldIndexed(initial: R, operation: (Int, R, T) -> R): R
|
||||
public header inline fun <T, R> Sequence<T>.foldIndexed(initial: R, operation: (index: Int, acc: R, T) -> R): R
|
||||
|
||||
/**
|
||||
* Performs the given [action] on each element.
|
||||
@@ -497,7 +497,7 @@ public header inline fun <T> Sequence<T>.forEach(action: (T) -> Unit): Unit
|
||||
* @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 <T> Sequence<T>.forEachIndexed(action: (Int, T) -> Unit): Unit
|
||||
public header inline fun <T> Sequence<T>.forEachIndexed(action: (index: Int, T) -> Unit): Unit
|
||||
|
||||
/**
|
||||
* Returns the largest element or `null` if there are no elements.
|
||||
@@ -580,7 +580,7 @@ public header fun <T> Sequence<T>.onEach(action: (T) -> Unit): Sequence<T>
|
||||
/**
|
||||
* 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 <S, T: S> Sequence<T>.reduce(operation: (S, T) -> S): S
|
||||
public header inline fun <S, T: S> Sequence<T>.reduce(operation: (acc: S, T) -> S): S
|
||||
|
||||
/**
|
||||
* Accumulates value starting with the first element and applying [operation] from left to right
|
||||
@@ -588,7 +588,7 @@ public header inline fun <S, T: S> Sequence<T>.reduce(operation: (S, T) -> S): 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 <S, T: S> Sequence<T>.reduceIndexed(operation: (Int, S, T) -> S): S
|
||||
public header inline fun <S, T: S> Sequence<T>.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.
|
||||
@@ -691,7 +691,7 @@ public header infix fun <T, R> Sequence<T>.zip(other: Sequence<R>): Sequence<Pai
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public header fun <T, R, V> Sequence<T>.zip(other: Sequence<R>, transform: (T, R) -> V): Sequence<V>
|
||||
public header fun <T, R, V> Sequence<T>.zip(other: Sequence<R>, transform: (a: T, b: R) -> V): Sequence<V>
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
|
||||
@@ -180,21 +180,21 @@ public header inline fun String.filter(predicate: (Char) -> Boolean): String
|
||||
* @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: (Int, Char) -> Boolean): CharSequence
|
||||
public header 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: (Int, Char) -> Boolean): String
|
||||
public header 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 <C : Appendable> CharSequence.filterIndexedTo(destination: C, predicate: (Int, Char) -> Boolean): C
|
||||
public header inline fun <C : Appendable> 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].
|
||||
@@ -441,7 +441,7 @@ public header inline fun <R> CharSequence.map(transform: (Char) -> R): List<R>
|
||||
* @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 <R> CharSequence.mapIndexed(transform: (Int, Char) -> R): List<R>
|
||||
public header inline fun <R> CharSequence.mapIndexed(transform: (index: Int, Char) -> R): List<R>
|
||||
|
||||
/**
|
||||
* Returns a list containing only the non-null results of applying the given [transform] function
|
||||
@@ -449,7 +449,7 @@ public header inline fun <R> CharSequence.mapIndexed(transform: (Int, Char) -> R
|
||||
* @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 <R : Any> CharSequence.mapIndexedNotNull(transform: (Int, Char) -> R?): List<R>
|
||||
public header inline fun <R : Any> CharSequence.mapIndexedNotNull(transform: (index: Int, Char) -> R?): List<R>
|
||||
|
||||
/**
|
||||
* Applies the given [transform] function to each character and its index in the original char sequence
|
||||
@@ -457,7 +457,7 @@ public header inline fun <R : Any> 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 <R : Any, C : MutableCollection<in R>> CharSequence.mapIndexedNotNullTo(destination: C, transform: (Int, Char) -> R?): C
|
||||
public header inline fun <R : Any, C : MutableCollection<in R>> 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
|
||||
@@ -465,7 +465,7 @@ public header inline fun <R : Any, C : MutableCollection<in R>> 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 <R, C : MutableCollection<in R>> CharSequence.mapIndexedTo(destination: C, transform: (Int, Char) -> R): C
|
||||
public header inline fun <R, C : MutableCollection<in R>> 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
|
||||
@@ -519,7 +519,7 @@ public header 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 <R> CharSequence.fold(initial: R, operation: (R, Char) -> R): R
|
||||
public header inline fun <R> CharSequence.fold(initial: R, operation: (acc: R, Char) -> R): R
|
||||
|
||||
/**
|
||||
* Accumulates value starting with [initial] value and applying [operation] from left to right
|
||||
@@ -527,12 +527,12 @@ public header inline fun <R> CharSequence.fold(initial: R, operation: (R, Char)
|
||||
* @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 <R> CharSequence.foldIndexed(initial: R, operation: (Int, R, Char) -> R): R
|
||||
public header inline fun <R> 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 <R> CharSequence.foldRight(initial: R, operation: (Char, R) -> R): R
|
||||
public header inline fun <R> CharSequence.foldRight(initial: R, operation: (Char, acc: R) -> R): R
|
||||
|
||||
/**
|
||||
* Accumulates value starting with [initial] value and applying [operation] from right to left
|
||||
@@ -540,7 +540,7 @@ public header inline fun <R> 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 <R> CharSequence.foldRightIndexed(initial: R, operation: (Int, Char, R) -> R): R
|
||||
public header inline fun <R> CharSequence.foldRightIndexed(initial: R, operation: (index: Int, Char, acc: R) -> R): R
|
||||
|
||||
/**
|
||||
* Performs the given [action] on each character.
|
||||
@@ -552,7 +552,7 @@ public header inline fun CharSequence.forEach(action: (Char) -> Unit): Unit
|
||||
* @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: (Int, Char) -> Unit): Unit
|
||||
public header inline fun CharSequence.forEachIndexed(action: (index: Int, Char) -> Unit): Unit
|
||||
|
||||
/**
|
||||
* Returns the largest character or `null` if there are no characters.
|
||||
@@ -603,7 +603,7 @@ public header inline fun <S : CharSequence> 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: (Char, Char) -> Char): Char
|
||||
public header inline fun CharSequence.reduce(operation: (acc: Char, Char) -> Char): Char
|
||||
|
||||
/**
|
||||
* Accumulates value starting with the first character and applying [operation] from left to right
|
||||
@@ -611,12 +611,12 @@ public header inline fun CharSequence.reduce(operation: (Char, Char) -> Char): 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.reduceIndexed(operation: (Int, Char, Char) -> Char): Char
|
||||
public header 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, Char) -> Char): Char
|
||||
public header inline fun CharSequence.reduceRight(operation: (Char, acc: Char) -> Char): Char
|
||||
|
||||
/**
|
||||
* Accumulates value starting with last character and applying [operation] from right to left
|
||||
@@ -624,7 +624,7 @@ public header inline fun CharSequence.reduceRight(operation: (Char, Char) -> Cha
|
||||
* @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: (Int, Char, Char) -> Char): Char
|
||||
public header 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.
|
||||
@@ -658,7 +658,7 @@ public header infix fun CharSequence.zip(other: CharSequence): List<Pair<Char, C
|
||||
/**
|
||||
* 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 <V> CharSequence.zip(other: CharSequence, transform: (Char, Char) -> V): List<V>
|
||||
public header inline fun <V> CharSequence.zip(other: CharSequence, transform: (a: Char, b: Char) -> V): List<V>
|
||||
|
||||
/**
|
||||
* Creates an [Iterable] instance that wraps the original char sequence returning its characters when being iterated.
|
||||
|
||||
Reference in New Issue
Block a user