Sudhir Singh Khanger
11/01/2018, 6:26 AMval that : Int -> Int = { three -> three }
fit the definition val lambdaName : Type = { argumentList -> codeBody }
?
https://www.baeldung.com/kotlin-lambda-expressionsnfrankel
11/01/2018, 6:58 AM(Int -> Int)
it’s a higher order function
that takes a Int
as a parameter and returns an Int
it’s defined as a function that returns the same value as its argument: the identity function{three -> three}
it could have been written {one -> one }
or {it -> it }
and since it
is the default parameter name
{it}
Sudhir Singh Khanger
11/01/2018, 8:08 AMthat
of type higher-order function (Int -> Int)
and we have a function which takes one argument three
and returns three
. Is that correct?nfrankel
11/01/2018, 8:22 AMSudhir Singh Khanger
11/01/2018, 8:29 AM