-- take a function f and return the derivative f' derivative f = let dx = 0.000000001 in let f' = \ x -> (f (x + dx) - (f x)) / dx in f'