Skip to content

Commit

Permalink
Add clarification for negative times parameter of kotlin.repeat f…
Browse files Browse the repository at this point in the history
…unction.

#KT-54859 Fixed
  • Loading branch information
sandwwraith authored and qodana-bot committed Dec 14, 2024
1 parent ce420a8 commit bcf93b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/stdlib/src/kotlin/util/Standard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ 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].
* A zero-based index of current iteration is passed as a parameter to the [action] function.
*
* If the [times] parameter is negative or equal to zero, the [action] function is not invoked.
*
* @sample samples.misc.ControlFlow.repeat
*/
Expand Down

0 comments on commit bcf93b1

Please sign in to comment.