値渡しの場合
val f: (Int) => Int = {(i) => {i * i}} # f: Int => Int = <function1>
の省略形です
val f: Function1[Int, Int] = {(i) => {i * i}} # f: Int => Int = <function1>
次に、名前
で呼び出す場合は?
val f: (=> Int) => Int = {(i) => {i * i}} # f: (=> Int) => Int = <function1>
の省略形です
。
何 ?
で、もし
値による呼び出し時
val f = {(i) => {i * i}}:(Int) => Int # f: Int => Int = <function1>
の省略形です
val f = {(i) => {i * i}}:Function1[Int, Int] # f: Int => Int = <function1>
次に、名前
で呼び出す場合は?
val f = {(i) => {i * i}}:(=>Int) => Int # f: (=> Int) => Int = <function1>
の省略形です
。
何 ?
言い換えると
if (Int) => IntはFunction1[Int, Int]の短縮形です
then (=> Int) => Intは?の省略形です。何 ?
ありがとうございました !