inline infix fun T.or(orBlock: () → T) = if (this == null) orBlock() else this
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Feature request - guard from Swift | 3 | 1269 | September 22, 2018 | |
Extension to ?.let syntax | 7 | 3765 | February 20, 2020 | |
Compiler option(s) proposal: provide nullability assumptions when interacting with non-annotated Java code | 8 | 1735 | March 31, 2021 | |
Having fun with Kotlin and Unicode
|
3 | 1230 | July 6, 2020 | |
Condition operators for If expression | 7 | 1060 | August 9, 2021 |