Cannot "compose" both method and function
I define a method and a function:
def print(str:String) = println
val intToString = (n:Int) => n.toString
Now I want to create them.
My problem is why neither one nor the other:
print(_) compose intToString
print(_:String) compose intToString
compiles?
But:
(print(_)) compose intToString
(print _ ) compose intToString
compiles?
+3
source to share