elect
06/14/2019, 8:57 AMonEachIndexed
?Hullaballoonatic
06/16/2019, 6:51 PMIndexed
version of all iterating methods.
But you can already do this:
val foo = listOf(1, 4, 5, "foo", false, 9)
fun bar(i: Int, it: Any): Any = ...
val bar = foo.withIndex().onEach { (i, it) ->
bar(i, it)
}
karelpeeters
06/16/2019, 7:56 PMwithIndex()
was a free operation but unfortunately it's not 😞Hullaballoonatic
06/16/2019, 7:56 PM