alexsullivan11409/06/2017, 3:44 PM
elizarov09/06/2017, 3:55 PM
. You can also do early return. Works great when you judiciously apply “introduce function” refactoring to your code
val smth = ....
alexsullivan11409/06/2017, 3:58 PM
kingsley09/06/2017, 9:47 PM
val a = couldBeNull ?: return val b = anotherNullable ?: return // Now, a and b are not null
alexsullivan11409/07/2017, 3:28 PM