Printing function result

Report a typo

Consider this function:

fun f(): Int {
    return 0
}

The code below prints 0 to the screen:

val q = f()
print(q)

This code does the same:

val m = ::f
print(m())

Match the objects and their types.

Match the items from left and right columns
q
m
() -> Int
Int
___

Create a free account to access the full topic