Android developers spend countless hours dealing with lists of data, and with the vast amount of collection operations available to us (think ‘map’, ‘filter’ or ‘sort’) it’s become easier than ever to manipulate that data into the format we want. But all that processing can come at a cost, as sometimes we sacrifice efficiency in the name of readable and concise code. It would be great if there was a way we could do both - be a good citizen when dealing with data, while also still using all the handy operations that we’ve grown to love...
Enter Kotlin Sequences! They offer a different take on iterating through data than a Collection, and in many cases allow you to work with your data more efficiently. Join us as we go through the ins and outs of Kotlin Sequences - what they are, when to use them, and what advantages they offer over traditional collections.