Question: further on premature evaluation, substitution and assuming.

Thank you

Your answer makes sense if Maple evaluates from innermost to outermost, so the substitution in T2c takes place AFTER Test is evaluated with a symbolic value of "n".

 But it doesn't explain why the "assuming" examples work - or don't work. If "Test" is evaluated first, then none of the examples should work; if the assumption is passed through "simultaneously" (whatever that means), then the wording of the error message doesn't make sense in  the one case where the error occurs.

 Although this example was constructed specifically to explore these questions, your change of subject heading to "premature evaluation" gets to the heart of the matter.

How does one postpone evaluation? I have been reading about "eval" and "uneval" without any luck.

The immediate problem is a program where a procedure calls a procedure. The inner procedure is evaluated when the outer procedure is defined, and the same kind of thing happens as in this simple example.

Please Wait...