`fun repeatReversed(times: Int, action: (Int) -&gt...
# language-proposals
h
fun repeatReversed(times: Int, action: (Int) -> Unit)
in stdlib?
2
m
Is it so common that it has a benefit over
(n downTo 0).forEach { … }
?
h
well,
repeatReversed(n)
would equate to
(n - 1 downTo 0)::forEach
i use
repeat(n)
in almost all cases over
(0 until n)::forEach
m
True,
- 1
. The name
repeatReversed
is quite confusing already 😅
p
Just for the future: #stdlib 🙂
h
oh, thank you, @Pavlo Liapota. I never want to post in the wrong channel, but I'm not aware of all of them
👍 1