diff options
-rw-r--r-- | kotlin.html.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kotlin.html.markdown b/kotlin.html.markdown index c16b5db1..45decb1e 100644 --- a/kotlin.html.markdown +++ b/kotlin.html.markdown @@ -124,7 +124,7 @@ fun helloWorld(val name : String) { You can also use lambda functions, with the '->' operator seperating the parameters from the function body. */ - fun fooLambda: (Int) -> Int = {n -> n + 1} + val fooLambda: (Int) -> Int = {n -> n + 1} println(fooLambda(1)) // => 2 // Functions can take functions as arguments and return functions. |