Kotlin stdlib Stack Overflow

Elements combination in Kotlin collections

I'm not a regular StackOverflow user, neither as a contributor, nor to ask questions. However, I recently stumbled upon a question, tried to help... and failed. I was pointed out my answer was wrong - thanks for everyone who did. I think failures are great occasions to learn something new! In this post, I'd like to detail what I learned after digging further: there are several ways to combine elements from an existing collection in Kotlin stdlib.