Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created September 15, 2022 20:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save s1monw1/1bf6f5958ecc26fae7db4d516ace4175 to your computer and use it in GitHub Desktop.
// 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