};
public List<Substitution> allValidSubs(Substitution existing, FreeVars fv) {
FreeVars actualFreeVars = new FreeVars();
for (SpecVar spec : fv) {
if (existing.getSub(spec) == null) {
actualFreeVars = actualFreeVars.addVar(spec, fv.getType(spec));
}
}
ConsList<Pair<SpecVar, String>> freeVarList = actualFreeVars.convertToConsList();
List<Substitution> subs = new LinkedList<Substitution>();
subs.add(existing);
return freeVarList.foldl(validSubsLambda, subs);