Looking at How to define a function which accept both Seq[T] and ParSeq[T] as parameter?, I figured lub
(Least Upper Bound) was appropriate
However it gives the following, long output:
import scala.reflect.runtime.universe._
scala> lub( List( typeOf[scala.collection.Seq[Int]],
typeOf[scala.collection.parallel.ParSeq[Int]] ) )
res1: reflect.runtime.universe.Type = scala.collection.GenSeq[Int]{def ...
It looks like GenSeq
is the lub
. However, how can I get the type alone, i.e. GenSeq[Int]
, excluding other details?