Kotlin : Slow List and Lazy Sequence

Came from Java 7 into Kotlin, we are so happy that we could easily have Collection operators on List and chain them together. But little did we know List with it’s iterator is not the best thing still (for some case), there another thing call Sequence.

A little background on List, the hard worker.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store