You want a list of `LongProgression`s? Then someth...
# announcements
k
You want a list of `LongProgression`s? Then something like
.zipWithNext().map { (p,n) -> p until n }
👆 1
s
just gotta wrap
p, n
in parens to destructure, but yeah this’ll do exactly what you need
though technically speaking if you want a list of `LongProgression`s specifically, you’d have to slap on a
step
, but I’d think
LongRange
should be fine, too
k
Fixed, thanks! I'm not at a pc and didn't feel like looking it up.
d
Perfect! Thanks alot! There's even shorter:
Copy code
val parts = 0L..200L step 50L
    
    println(parts.zipWithNext { f, l -> f until l })
[0..49, 50..99, 100..149, 150..199]
👍 1