Hi, All!
I want to write a procedure simplify (E, E1) which is able to simplify expressions. I have only one operation +, and symbolic and numeric operands. Examples of this procedure:
simplify(a + 1 + b + 5, E) ------> E = a + b + 6
simplify(1 + b + 9 + a + 5 + c, E) ------> E = b + a + c + 15
All the characters we shift to the beginning. Then we calculate the sum of numerical operands and appends it to the end of the expression.
How to write a procedure?