As an experiment (and because I generate anonymous functions from user data), I ran the following MATLAB code:
h = @(x) x * x h = @(x) x * x h(3) ans = 9 h = @(x) h(x) + 1 h = @(x)h(x)+1 h(3) ans = 10
Basically, I made an anonymous function call. Instead of acting recursively, MATLAB recalled the old definition of a function. However, the workspace does not show it as one of the variables, and the descriptor does not seem to know about it either.
Will the old function be kept behind the scenes while I keep the new? Are there any βstripsβ with such a design?
source share