https://kotlinlang.org logo
#announcements
Title
# announcements
n

Nicholas Bilyk

10/15/2017, 7:40 PM
it's Sunday so forgive the laziness, but here's what I thought of
Copy code
val a = mapOf("a" to 3)
	val b = mapOf("a" to 4, "b" to 5)

	val unionKeys = a.keys.union(b.keys)
	val merged = hashMapOf<String, Pair<Int, Int>>()
	for (key in unionKeys) {
		merged[key] = Pair(a[key]!!, b[key]!!)
	}
	println(merged)
d

dave08

10/16/2017, 2:16 AM
@Nicholas Bilyk Like I said to Ilya, I need the key, that matched, and first null when
b
is 5
2 Views