substitutions within a function



I know there's something I don't understand about maxima
evaluation... I have an expression "fma_steady" and I want to create a
function which has 2 parameters which returns the result of
substituting those parameters into the expression fma_steady.

Residfma(h,v) := block([expr:subst(v,vx(x), subst(h,h(x),lhs(fma_steady)))],
  ev(expr,diff));

Here's what happens when I call it with an example set of arguments:

(%i54) Residfma(1+a*x,1+b*x);

h evaluates to a*x+1
Improper name or value in functional position.
#0: Residfma(h=a*x+1,v=b*x+1)
 -- an error.  Quitting.  To debug this try debugmode(true);

what's going on?


-- 
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan