Skip to content

Instantly share code, notes, and snippets.

@sagarpatel288
Last active May 5, 2020 08:29
Show Gist options
  • Save sagarpatel288/fadbd3700b3d2ccf5db492b5f808f6d1 to your computer and use it in GitHub Desktop.
Save sagarpatel288/fadbd3700b3d2ccf5db492b5f808f6d1 to your computer and use it in GitHub Desktop.
When a higher order function has only one parameter and the parameter type is function type
/**
* While calling the higher order function When the function type parameter is only parameter,
* we can simply write our business logic between curly braces after writing the function name
* and omit function call parentheses like below:
*/
doSomething { x: Int, y: Int -> x + y }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment