public List < Type > newInstances ( List < Type > tvars ) { List < Type > tvars1 = tvars . map ( newInstanceFun ) ; for ( List < Type > l = tvars1 ; l . nonEmpty ( ) ; l = l . tail ) { TypeVar tv = ( TypeVar ) l . head ; tv . bound = subst ( tv . bound , tvars , tvars1 ) ; } return tvars1 ; }
Create new vector of type variables from list of variables changing all recursive bounds from old to new list .