Y
Hacker News
new
|
ask
|
show
|
jobs
by
melony
1106 days ago
What do also and use do?
1 comments
Aaron2222
1105 days ago
Kotlin has a bunch of scope functions[0]. `a.also(f)` takes a function `f`, calls `f(a)`, and returns `a`.
[0]:
https://kotlinlang.org/docs/scope-functions.html
link
[0]: https://kotlinlang.org/docs/scope-functions.html