Hello,
I am trying to figure out how to define a macro or function which will
sum a given expression of a given variable from 1 to 4.
This does not work:
sum1to4(exp, var) ::= sum(exp, var, 1, 4);
sum1to4(x, x);
4*x
sum(x, x, 1, 4);
10
I've tried adding the ' operator in various places, but I've not been
able to create a working definition. How should I define this function?
Thank you in advance,
Hal