if when calling by-value
val f: (Int) => Int = {(i) => {i * i}} # f: Int => Int = <function1>
is the shorthand for
val f: Function1[Int, Int] = {(i) => {i * i}} # f: Int => Int = <function1>
then when calling by-name
val f: (=> Int) => Int = {(i) => {i * i}} # f: (=> Int) => Int = <function1>
is the shorthand for
? what ?
and if
when calling by-value
val f = {(i) => {i * i}}:(Int) => Int # f: Int => Int = <function1>
is the shorthand for
val f = {(i) => {i * i}}:Function1[Int, Int] # f: Int => Int = <function1>
then when calling by-name
val f = {(i) => {i * i}}:(=>Int) => Int # f: (=> Int) => Int = <function1>
is the shorthand for
? what ?
in other words
if (Int) => Int is shorthand for Function1[Int, Int]
then (=> Int) => Int is shorthand for ? what ?
Thank you !