Skip to content

Instantly share code, notes, and snippets.

Last active Sep 8, 2022
What would you like to do?
// A function `higherOrderFunction` taking another function `functionAsArgument` as its argument.
// The function calls the passed in function passing the value `5` to it. The result of `functionAsArgument(5)`
// is returned back to the caller.
fun higherOrderFunction(functionAsArgument: (Int) -> String) =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment