Last active
September 8, 2022 08:56
-
-
Save s1monw1/14679fdd2687ad04eb9312c1bff2a718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) = | |
functionAsArgument(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment