Coding Kotlin functional style. Is it possible?

Depends on whether you like the way it looks.

No. let is an inline function. It should generate close to identical code to your second example. There might be some small differences but none impacting performance.

You might also be interested in this topic about the possibility of a pipe operator. Although I doubt that one will be implemented it contains some useful ideas and implementations.

1 Like