Skip to content

Instantly share code, notes, and snippets.

@sagarpatel288
Created May 5, 2020 08:32
Show Gist options
  • Save sagarpatel288/c7180f63feb67f40bb677d5ff7ca8f86 to your computer and use it in GitHub Desktop.
Save sagarpatel288/c7180f63feb67f40bb677d5ff7ca8f86 to your computer and use it in GitHub Desktop.
A higher order function with one and only function type parameter
//region A higher order function that has one and only function type parameter
private fun doSomething(ft: (Int, Int) -> Int) {
val result = ft(1, 2)
/*...*/
}
//endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment