gjesse
09/29/2017, 7:16 PMfun foo() : Map<String, String> {
return mapOf("a" to null, "b" to "foo")
.mapNotNull { entry -> entry.value?.let { entry.key to it } }
.toMap()
}
fun blah() : Map<String, String> {
return mapOf("a" to null, "b" to "foo")
.filter{ it.value != null }
.mapValues { it.value!! }
}