
Sign up to save your podcasts
Or


In this episode of Fragmented, we go back to learning some Kotlin and look at the Iterable like data structure introduced called "Sequences". What is a sequence? How is it different from Iterable? When should I use it?
Eager evaluation:
Lazy evaluation:
Source stackoverflow.com answer
Notice that at each chain operation, a new temporary list is created:
Using a sequence:
Without a terminal operation, Sequences won't print anything:
You can't pick an index from a sequence:
By Donn Felker, Kaushik Gopal5
6868 ratings
In this episode of Fragmented, we go back to learning some Kotlin and look at the Iterable like data structure introduced called "Sequences". What is a sequence? How is it different from Iterable? When should I use it?
Eager evaluation:
Lazy evaluation:
Source stackoverflow.com answer
Notice that at each chain operation, a new temporary list is created:
Using a sequence:
Without a terminal operation, Sequences won't print anything:
You can't pick an index from a sequence:

361 Listeners

402 Listeners

53 Listeners

48 Listeners

90 Listeners