So I just playing around with kotlin and can't get around my head about this.
fun itsAfunction() = 10
fun check(function:()->Int):Int{
return function() + 9
}
val result = check(itsAfunction)
why I can not pass a function inside the function check?
if I did something like this, this will be accepted
val result = check({itsAfunction})
the question is what is the difference between function and lambda? I always tough both are the same but in this case it is not.
thank you