Most Specific Generalized (MSG) type of ts.
Most Specific Generalized (MSG) type of ts. Currently just the type of the first element as long as all the elements have the same type.
Performs pairwise type unification making sure each type variable is equally substituted in all items.
Finds a substitution subst
of type variables such that unifyTypes(applySubst(t1, subst), t2) shouldBe Some(emptySubst)