Question: do we need to declare symbols used internally by Maple own functions? map, subsindets, and others

inside a local proc, when calling a  function such as map using the syntax map(x->x^2, target) does one need to declare as local inside the proc?

Same for other Maple calls, which uses something similar. For example 

subsindets(expr,'specfunc( anything, csgn )', f->simplify(f));

does one need to declare local to the proc where the above call is made?

Which one of these two example is more correct?

restart;
foo:=proc(expr)
  local x;
  map(x->x^2,expr);
end proc;

foo([x,y])

vs.

restart;
foo:=proc(expr)
    map(x->x^2,expr);
end proc;
foo([x,y])

In Mathematica for example, such symbols used by similar functions of the system (for example, Plot command, and others) are automatically localized to the system call itself avoiding any conflict with user own symbols.

I am not sure how Maple handles this. Should one always declare these symbols?

Maple 2020.2

 

 

Please Wait...