if(argument instanceof Symbol) {
list.add(new Term(argument));
} else if(argument instanceof Vector) {
intercept((Vector)argument, subtracting);
} else if(argument instanceof FunctionCall) {
FunctionCall call = (FunctionCall)argument;
if(call.getFunction() == UNION) {
unionTerms(list, call);
} else if(call.getFunction() == EXPAND_TERMS) {
multiply(list, call);
} else if(call.getFunction() == DIFFERENCE) {
difference(list, call);
} else if(call.getFunction() == GROUP) {
add(list, call.getArgument(0), subtracting);
} else {
list.add(new TermBuilder().build(call));
}
}
}