Try making an assignment to 'current_let_rule_package.'
(%i1) dorules(x) := letsimp(x);
(%o1) dorules(x):=LETSIMP(x)
(%i2) let([a,b],rule1);
(%o2) a-->b
(%i3) let([c,d],rule2);
(%o3) c-->d
(%i4) current_let_rule_package : rule1;
(%o4) rule1
(%i5) dorules(a+b+c+d);
(%o5) d+c+2*b
(%i6) current_let_rule_package : rule2;
(%o6) rule2
(%i7) dorules(a+b+c+d);
(%o7) 2*d+b+a
Barton
-----maxima-admin@math.utexas.edu wrote: -----
>From: C Y
>
>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
>
>
_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxim
>a