I'm studying SICP, and I didnt exactly get the idea behind function return.
(define (deriv g)
(lambda (x)
(/ (- (g (+ x dx)) (g x))
dx)))
Code above will be used as ((deriv square) 10), why cant we just make this code simpler? By evaluating the result in 1 step?
(define (deriv g x)
(/ (- (g (+ x dx)) (g x))
dx))
Why do we REALLY need function as returned value? Abstraction? Partial application? I guess there is a much more simpler and clearer idea, what do we need it for, and WHERE to use it. Thanks!