Need Assistance?

support@tutorialshub.in

Collections, Maps & Sequences

List (Eager) vs Sequence (Lazy)

ADVERTISEMENT
Kotlin Free Lesson
5 min read
ADVERTISEMENT

Chaining .filter().map() on a regular List creates an intermediate list at every step. On large collections (10,000+ items), call .asSequence() first so items flow lazily one by one (just like Java Streams!).

ADVERTISEMENT
Hi, I'm Tuby! Here to help you