Add sample for 'repeat' function
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
This commit is contained in:
@@ -128,6 +128,8 @@ public inline fun <T> T.takeUnless(predicate: (T) -> Boolean): T? {
|
||||
* Executes the given function [action] specified number of [times].
|
||||
*
|
||||
* A zero-based index of current iteration is passed as a parameter to [action].
|
||||
*
|
||||
* @sample samples.misc.ControlFlow.repeat
|
||||
*/
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun repeat(times: Int, action: (Int) -> Unit) {
|
||||
|
||||
Reference in New Issue
Block a user