Hey Mario, first of all: thanks for your kind words!
It's definitely true that function composition would be the better solution here. I used extensions because it's "pure" Kotlin. I didn't want to copy your examples and solutions, either. Thought that would be boring :-)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.