But there isn't a kotlin stdlib solution that I'm ...
# announcements
h
But there isn't a kotlin stdlib solution that I'm aware
e
File a request to http://kotl.in/issue
i
But better to search first, AFAIK there's already one about cycle.
It is one-liner to write, though:
Copy code
fun <T> Iterable<T>.cycle() = sequence { while(true) { yieldAll(this@cycle) } }
🙂 2
h
I don't think I've ever had a need for such a thing; nice that it can be implemented to trivially though