Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created September 15, 2022 20:54
Embed
What would you like to do?
// Before Refactoring
LOG.debug("response from git api: $responseAsString\n")
val contributors =
mapper.readValue(responseAsString)
// With Scope Function
val contributors = responseAsString.let {
LOG.debug("response from git api: $it\n")
mapper.readValue(it)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment