ribesg
list.withIndex().groupBy { it.index / 1000 }.map { it.value.map { it.value } }.forEach { listChunk -> ... }