https://kotlinlang.org logo
j

jabba

10/29/2017, 3:24 PM
I needed a function that gives back the next prime number. I could do it with an iterator, and calling
.next()
yields the next number. It's also lazy as I understood. How would it be different with a sequence?