https://kotlinlang.org logo
Title
r

reik.schatz

03/11/2019, 8:34 AM
is there a way to generate a sequence but keep the invocation count internal (i.e. not having a mutable
count
as in: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/generate-sequence.html)
g

gsala

03/11/2019, 8:38 AM
maybe just
generateSequence(initialCount) {it + 1}
?
s

sitepodmatt

03/11/2019, 8:50 AM
does seem odd they would put the mutable var example at the top of page, although the answer / correct way is only one page fold away
r

reik.schatz

03/11/2019, 8:55 AM
thanks everyone 🙂