4 ms·
Kotlin also has extensions function `let` (and a couple of variants) which let you chain arbitrary methods: ``` val arr = ... val result = arr .let { column(
by hn8726 1y ago
Kotlin also has extensions function `let` (and a couple of variants) which let you chain arbitrary methods:
```
val arr = ...
val result = arr
.let { column(it, "tags")
.let { merge(it) }
.let { unique(it) }
.let { values(it) }
```
You add function references for single-argument functions too:
```
arr.let(::unique) // or (List<>::unique), depends on the function
```
all without adding a special language construct.