public override Boolean EqualType(ExprType other) {
return (other is FunctionType)
&& (other as FunctionType).HasVarArgs == this.HasVarArgs
// same return Type
&& (other as FunctionType).ReturnType.EqualType(this.ReturnType)
// same number of arguments
&& (other as FunctionType).Args.Count == this.Args.Count
// same argument types
&& (other as FunctionType).Args.Zip(this.Args, (entry1, entry2) => entry1.type.EqualType(entry2.type)).All(_ => _);
}