Anybody know how I can use different rulesets in a function by
assigning their names to a variable? The obvious way doesn't work:
(%i1) dorules(x) := letsimp(x,rulelist);
(%o1) dorules(x) := LETSIMP(x, rulelist)
(%i2) let([a,b],rule1);
(%o2) a --> b
(%i3) let([c,d],rule2);
(%o3) c --> d
(%i4) a+b+c+d;
(%o4) d + c + b + a
(%i5) letsimp(%o4,rule1);
(%o5) d + c + 2 b
(%i6) letsimp(%o4,rule2);
(%o6) 2 d + b + a
(%i7) rulelist : rule1;
(%o7) rule1
(%i8) dorules(%o4);
(%o8)/R/ d + c + b + a
(%i9) rulelist : rule2;
(%o9) rule2
(%i10) dorules(%o4);
(%o10)/R/ d + c + b + a
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail