Nice! (pun semi-intended) Seems quite similar to what I proposed here: Kotlin and the Expression Problem