Simplified, from a more complex program:
scala> type T = (String) => String defined type alias T scala> def f(s: String) = s + " (parsed)" f: (s: String)java.lang.String scala> f _ res0: (String) => java.lang.String = <function1> scala> def g(func: T) = func _ <console>:6: error: _ must follow method; cannot follow (String) => String def g(func: T) = func _ ^
I really don't understand why this is not working. What is the difference between a method and something in the form (Type1, Type2 ...) => Type , and what is the correct way to get a partial part from something like that?
source share