karelpeeters
08/02/2017, 9:37 PMalso that ignores the receiver, right? Something that fits here:
return call().ignore{ //no it or this here }kingsley
08/02/2017, 9:38 PMdiesieben07
08/02/2017, 9:38 PMreturn try { call() } finally { ... } maybe?kingsley
08/02/2017, 9:39 PMreturn run { call(); /* more stuuff */ }karelpeeters
08/02/2017, 9:39 PMkingsley
08/02/2017, 9:40 PMapply or also and ignore the receiverkarelpeeters
08/02/2017, 9:40 PMkingsley
08/02/2017, 9:40 PMdiesieben07
08/02/2017, 9:41 PMval result = call()
// do stuff
return result
Nothing wrong with locals 😉karelpeeters
08/02/2017, 9:42 PMkingsley
08/02/2017, 9:42 PMinline fun <T> T.ignore(block: () -> Unit): T {
block()
return this
}karelpeeters
08/02/2017, 9:43 PMilya.gorbunov
08/03/2017, 12:38 AMalso and ignore the parameter naming it with _ placeholder:
call().also { _ -> .... }