<@U0CP8EBRV> commented on <@U9E6Q296F>’s file <htt...
# announcements
u
@Czar commented on @Daniel Loaiza’s file https://kotlinlang.slack.com/files/U9E6Q296F/F9DNUKY2V/pair_extension.kt: I'd use something like this:
Copy code
fun <T, U, R> ifNotNull(first: T?, second: U?, block: (T, U) -> R): R? =
	if (first != null && second != null) block(first, second) else null

println(ifNotNull("a", "b") { first, second -> first + second })