This Week I Learned: Kotlin collections operations [2022–05–27]
May 27, 2022
Kotlin has a lot of in-built operations on collections. You can do many powerful things very easily without relying on any libraries. I’m enjoying having the collections manipulation facilities that I’m used to from Node & Java plus some new ones.
Here is a screenshot of some code that I wrote as part of Kotlin Koans, which is also pretty neat. The live and commented-out code blocks produce the same result. One is half the size of the other and just needed a little extra thought to produce.
Go explore the collection operations — there’s a lot of neat stuff in there.