Strange error



Michel,

> alphas=[];
> alpha(n):=assoc(n,alphas);
> alpha(5);

Assignment is indicated by : (not =), so alphas=[] did not actually
assign anything to alphas. I think you want

alphas : [];
alpha(n) := assoc (n, alphas);
alpha(5);

I don't know what your goal is here, but other constructs that might
be useful are the array reference and array function.
For the array reference, alpha[5] : foo stores foo and then alpha[5]
retrieves it. If alpha[5] is not assigned a value then the result is
the unevaluated expression alpha[5]. For the array function,
alpha[n] := foo defines a so-called memoizing function. The first
time alpha[5] is evaluated, the function is called and the result is
stored. After that alpha[5] just returns the stored value.

Hope this helps,
Robert Dodier