uhe
05/26/2016, 1:39 PM// some fields
var x: String? = "asdf"
var y: Int? = null
// somewhere in a method, will only execute if both x and y are not null
let(x, y) { x, y ->
println(x.length)
println(y.inc())
}
inline fun <T1 : Any, T2 : Any> let(arg1: T1?, arg2: T2?, block: (T1, T2) -> Unit) =
if (arg1 != null && arg2 != null) block(arg1, arg2)
else Unit