karelpeeters
10/25/2018, 10:53 AM.zipWithNext().map { (p,n) -> p until n }
Shawn
10/25/2018, 10:58 AMp, n
in parens to destructure, but yeah this’ll do exactly what you needstep
, but I’d think LongRange
should be fine, tookarelpeeters
10/25/2018, 11:14 AMdave08
10/25/2018, 11:16 AMval parts = 0L..200L step 50L
println(parts.zipWithNext { f, l -> f until l })
[0..49, 50..99, 100..149, 150..199]