# SICP Solutions

### Section - 2.3 Symbolic Data

#### Exercise 2.58

My approach is to convert the given expression in a way such that part(a) of this exercise can be applied to the converted expression.

I am assuming operators are only restricted to * and +. However I think it should be easy to extend for other operators.

Test/Output:

Note that in the test example '(x * 3 * 5 * y * 6)) all numbers are not multiplied(only those which are present next to each other). This was not required in the exercise, so leaving it :).