Skip to content

Instantly share code, notes, and snippets.

@travisdachi
Last active August 13, 2016 10:17
Show Gist options
  • Save travisdachi/4cabf65944a5292da772730eb6cef0f9 to your computer and use it in GitHub Desktop.
Save travisdachi/4cabf65944a5292da772730eb6cef0f9 to your computer and use it in GitHub Desktop.
fun fetchSomething(someId: String, callback: (Something) -> Unit) {
val something = ...
callback(something)
}
fetchSomething("anotherId", { something ->
something.doSomething()
})
fetchSomething("someOtherId") {
it.doSomething()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment