3 ms·
Are you sure? Because in the example given, it seems that the inner function needs access to the function f
by phailhaus 10y ago
Are you sure? Because in the example given, it seems that the inner function needs access to the function f
- AnimalMuppet 10y agoSee smitherfield's examples. Yes, the inner function needs access to f. This means that it has to be passed in to the inner function. But in my view, that's not any different than (in the original example) having deriv-cube calling deriv with cube as an argument (or composing deriv and cube, if you prefer). You may say that the difference is that in Lisp, deriv-cube is a partial application, whereas in C you really can't do that. And you'd be right. But for this example, I don't see what difference it makes.