Skip to content

Instantly share code, notes, and snippets.

@bjartek
Created October 22, 2019 07:56
Show Gist options
  • Save bjartek/5e38283d5155d42227e45a941f4edd18 to your computer and use it in GitHub Desktop.
Save bjartek/5e38283d5155d42227e45a941f4edd18 to your computer and use it in GitHub Desktop.
val saleMap = listOf("foo" to 1)
val smsToGen = listOf(1)
val result: List<Pair<String, Int>> = smsToGen.mapNotNull { sms ->
val found = saleMap.find { it.second == sms }
if (found == null) {
logger.debug("adfs")
}
found
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment