I have a problem that's driving me a little crazy....
# random
t
I have a problem that's driving me a little crazy. What is the most Kotlin-idiomatic way (preferably using Sequence operators) to consolidate a
List<ClosedRange<LocalDate>>
into another
List<ClosedRange<LocalDate>>
but compress the ranges that are consecutive into a single one? Tried using
window(2)
and some recursion tactics, but I'm not finding a clear way to do this.