O'Reilly logo
  • MICHAEL MASLENKO thinks this is interesting:

Another possibility is to use the generateSequence function. This function calculates the next element in a sequence given the previous one

From

Cover of Kotlin in Action

Note

5 Fact
progressions and recursion