To complete the answer @Moritz, you need to select a type argument for T1, which is a subtype of the input type of each function in the list. Nothingsuitable for counting - this is a subtype of each type.
scala> val l: List[Nothing => Any] = List((b: String) => b, (a: Int) => a)
l: List[(Nothing) => Any] = List(<function1>, <function1>)
There is also an existential type:
scala> val l: List[_ => _] = List((b: String) => b, (a: Int) => a)
l: List[Function1[_, _]] = List(<function1>, <function1>)
source
share