I am trying to define a function, A, which has a function call, B, in its body. The function call to B is independent of input parameters of A. Maple does not call B at function definition. Is there any way to force it to evaluate call to B at function definition time?
Example:
B := x -> 2 * x;
A := x -> B(2) + x ^ 2;
A first it might look irelevent to ask for compution a constant at function definition type, but it have some usage cases for example at higher order functions:
A := n -> (x-> add(i, i=1..n)*x)