WingNews logo WingNews
top | new | best | ask | show | jobs
top | item 36195086

(no title)

melony | 2 years ago

What do also and use do?

discuss

order

Aaron2222|2 years 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

powered by hn/api // news.ycombinator.com