Question: Using a proc to change a member in a list

Suppose I want to use a proc to change an element in a list. I run into this problem > TestProc := proc (s) s[3] := 5 end proc; > s := [1, 2, 3, 4]; [1, 2, 3, 4] > TestProc(s); Error, (in TestProc) illegal use of a formal parameter I realize I could make s a global variable, but what if I want my proc to be able to operate on *any* list? In C++ one would use a pointer, but I don't see that kind of capability in MAPLE. Is there another way to do it? -Thanks
Please Wait...