I've been playing with
Python some more, and got the equivalent code to
Nathan's
numerical deriver in lisp. Here's the code:
def cube(x):
return x*x*x
def deriv(f):
step = .0001
return lambda x : (f(x+step) - f(x))/step
Then running it in the interpreter:
>>> deriv(cube)(10)
300.00300000892821
>>> deriv(deriv(cube))(10)
60.000616031175014
I'm currently making a stab at a tree generator. I like not having types all over the place.