Derivative of a function
In Calculus class, I learned two forms for the derivative. The first was the Limit definition. The other was a symbolic method, which used many identities that you had to learn to be able to find the derivative.
Here is the limit definition of the derivative:
For this challenge, define a function
deriv that takes a function and returns
the derivative of that function, using the limit definition. You can use any
very small value for
h, or perhaps provide it as an optional argument.
This exercise is taken from SICP Chapter 1, Section 3.4.