Sequences
Lazy sequences, operations and when to use sequences vs lists.
1
kotlin sequences
2Sequence Basics in Kotlin
Sequence processes elements lazily one at a time. A Kotlin example with source code and sample output.
kotlin sequences
3Sequence Operations in Kotlin
A Kotlin example program demonstrating Sequence Operations, complete with the source code and expected sample output.
kotlin sequences
4Lazy Evaluation with Sequences in Kotlin
Lazy evaluation computes values only when needed. A Kotlin example with source code and sample output.
kotlin sequences
5Sequence vs List in Kotlin
List operations are eager and create intermediate lists. A Kotlin example with source code and sample output.
kotlin sequences
generateSequence in Kotlin
generateSequence creates potentially infinite sequence from seed and function. A Kotlin example with source code and sample output.