Question: How to defined new function based on other function, fixing other function at time of definition?

In the code below the new function g is defined based on existing function f, but the new function g is then dependent on f at the time of definition, which is shown since later changes to f will change value of g.

How to fix definition of g based on f at the when g is defined, so later changes of f does not alter g ?

Please Wait...