Consider the following:
f = 2 # &
OwnValues[f]
g = f[#]/2 &
OwnValues[g]
Since Function has the HoldAll attribute, g expresses its own value in terms of f instead of in terms of the own value of f. This obviously matters, because if I change f then g will change. Doesn't this conflict with the lambda calculus motivation of Function, making WL's "pure' functions even more impure (from a functional programming perspective)? Finally, in this case, is there a preferred way to force the definition of g to be in terms of the own values of f? I suppose g = Evaluate[f[[1]]/2] & is possible ...
Function[x, x ]you would have to keep track whetherxdoesn't have a value outside. – Kuba Sep 15 '16 at 06:31