The problem with Addition::new(x, -b) is that b needs to be signed. We therefore needs a Subtraction term. Both can be implemented with a more general structure ArithTerm<Op,InvOp> where Addition = ArithTerm<Add, Sub> and Subtraction = ArithTerm<Sub, Add>.
The problem with
Addition::new(x, -b)is thatbneeds to be signed. We therefore needs aSubtractionterm. Both can be implemented with a more general structureArithTerm<Op,InvOp>whereAddition = ArithTerm<Add, Sub>andSubtraction = ArithTerm<Sub, Add>.