>
|
|
| (3) |
>
|
|
>
|
|
>
|
|
| (7) |
>
|
|
>
|
map(proc(n)
description "an anonymous and recursive procedure";
(x -> apply(x, x))(f -> proc(p, c)
if c > n then
p
else
(f(f))(p * c, 1 + c)
end if
end proc)(1, 1)
end proc, [$ 1 .. 10]);
|
| (9) |
An example of special evaluation rules. The command Typesetting[Typeset] is an internal command that receives a Maple expression, and returns an expression used by the GUI for typesetting purposes. The output usually looks just like the input, but it is a very different expression:
>
|
|
>
|
|
Typesetting:-msqrt(Typesetting:-mi("x"))
| |
The first argument to Typeset has type uneval, signifying that it is not evaluated before being passed to Typesetting[Typeset]. In the previous example, that means we can assign something to (say, ), but still get a typeset square root of rather than of .
>
|
|
If we want to evaluate to before typesetting occurs, we can use the apply command.
>
|
|