Problem 8.1: Derive Sum (optional, 0 pts)
Implement derive-sum
, a procedure that differentiates a sum by summing the derivatives of the first-operand
and second-operand
. Use data abstraction for a sum.
Note: the formula for the derivative of a sum is
(f(x) + g(x))' = f'(x) + g'(x)
(define (derive-sum expr var)
'YOUR-CODE-HERE
)
The tests for this section aren't exhaustive, but tests for later parts will fully test it.