Yes, the code in the question is returning a function (that's what the lambda
is for). If it were returning a value, it'd be missing the line with (lambda (x)
and the corresponding closing parentheses.
Also notice that although the procedure is correct, the formula stated in the question isn't right, it should be:
g(x) = (f(x+h) - f(x))/h ; notice that x is the parameter to the second call to f
As a side note, the correct way to use the derivative function as defined would be:
(define der-sqr (der square 1e-10)) ; create the derivative *function*
(der-sqr 10) ; apply the function
=> 20.000072709080996