Should Either
work with parameterized functions?
case class FunOrSeq[T1, T2](e: Either[Function1[T1, T2], Iterable[T1]])
def f: Int => Int = x => x
scala> FunOrSeq(Left(f))
<console>:11: error: type mismatch;
found : scala.util.Left[Int => Int,Nothing]
required: Either[T1 => Int,Iterable[T1]]
FunOrSeq(Left(f))
Which was surprising to me - it works with explicit types:
scala> case class FunOrSeq[T1, T2](e: Either[(Int => Int), Iterable[T1]])
defined class FunOrSeq
scala> FunOrSeq(Left(f))
res6: FunOrSeq[Nothing,Nothing] = FunOrSeq(Left(<function1>))