dave08
infix fun LongRange.split(partSize: Long): List<LongRange> = (first..last step partSize).map { it..min(it + partSize - 1, last) }