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

Wouldn’t it be more convenient to use sequences instead of collections, if they’re so much better? The answer is: sometimes. If you only need to iterate over the elements in a sequence, you can use the sequence directly. If you need to use other API methods, such as accessing the elements by index, then you need to convert the sequence to a list


Cover of Kotlin in Action


6 why sequence are not used by default behind the scene. are they really that good? are overheads of sequences high?