code: function substTypeParameters(tparams, tenv) {
  	if (tparams.length === 0)
  		return { typeParams: [], tenv: tenv };
  	tenv = tenv.clone()
  	var typeParams = []
  	tparams.forEach(function (tparam) {
  		tenv.remove(tparam.name)
  		typeParams.push({
  			name: tparam.name,
  			constraint: tparam.constraint && substType(tparam.constraint, tenv)
  		})
  	})
  	return {
  		typeParams: typeParams,
  		tenv: tenv
  	}
  }
docs: ---------------------------------------------- Type Parameter Substitution ----------------------------------------------