Advice: One level evaluation for local variables
Inside a procedure, Maple uses one-level evaluation on local variables, instead of the full evaluation which is used on global variables. In most cases this is all that is needed, and in some cases it results in substantially improved efficiency.
qproc:= proc(x) local a,b;
Here is what happens when qproc(y) is executed:
Under most circumstances we want the results our procedures return to be fully evaluated, and not to contain local variables. Careful consideration of the order in which assignments are made can usually remedy the situation. If necessary, you can fully evaluate an expression using eval . Thus the procedure above could be rewritten:
qproc2:= proc(x) local a,b;
See also: Assignments do not commute , eval , Last name evaluation
Maple Advisor Database, R. Israel 1997