How about this? ``` fun <T : Comparable<T&g...
# coroutines
o
How about this?
Copy code
fun <T : Comparable<T>> ClosedRange<T>.toSequence(succ: T.() -> T) = buildSequence {
    generateSequence(start, succ).forEach { yield(it) }
}