I'm working with an own package of functions. During development I noticed, that my naming scheme is not that clever; for example some of my functions are starting with capital letters. But I have several files working with that package, that I would like to be able to use further on with as few as possible. So my idea is, to write a small package named loadOldNams
or something like that, providing the old function names additionally.
Therefore I'm facing the following problem:
Having a function with my new name - for simplification just f
, e.g.
f[x_] := x^2;
f[x_, y_] := x^2 y^2;
f::usage = "A test usage text";
I would like to define a function having the old name (say g
), such that all cases 'g[x], g[x,y]and the
::usagealso work with
g`.
Just f=g;
or f:=g;
won't work, so
How do I get a function with the name g
doing exactly the same as f
(just having another name)?