On Tue, 2010-03-02 at 22:40 +0100, Janek Kozicki wrote:
> aa:a=x+y;
> aaa(x,y):=rhs(aa);
> aaa(1,2);
>
> doesn't produce 3, but x+y
I would recommend that you forget about := and start using "define".
Instead of:
f(x,y) := x+y
use:
define(f(x,y), x+y)
(%i2) aa:a=x+y;
(%o2) a = y+x
(%i3) define(aaa(x,y), rhs(aa));
(%o3) aaa(x,y):=y+x
(%i4) aaa(1,2);
(%o4) 3
Since you use "functions" in the mathematical sense and not as small
programs, you will avoid future problems if you get used to define()
Regards,
Jaime Villate