Scheme Derivative Function
问题 I wrote a simple derivative function in scheme today. I was asked to return a function such that g(x) = (f (x+h) -f(x))/h . Does this suffice to return a function or does this only return a value? (define (der f h) (lambda (x) (/ (- (f(+ x h)) (f x)) h))) 回答1: 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