# SICP Solutions

### Section - 2.5 - Systems with Generic Operations

#### (a)

Here goes the code for reduce-poly and reduce-terms:

Note that reduce-poly attaches the variable to both polynomials - somthing which I missed in first attempt.

#### (b)

The only thing to pay attention here is using map to tag each output generated by reduce-poly.

Test/Output:

Note that again there is a difference of signs in the manual answer and from the program. Here this does not matter since sign from the numerator and dinominator cancels out.

Since this completes the code for all chapter 2. I am putting the latest version of the complete code here:

Note: this does not use drop in apply-generic, I removed it when I started working with rational polynomials.