Dear Roland,
thank you so much, it works great!
But: How can the non-specialized user of Maxima know about this?
If you do the analog thing with "normal" variables like in
x : 3;
x2 : x;
x2 : 5;
the variable x retains its value (3) - in contrast to the example with
the lists.
Is this subject matter written up somewhere in some manual or tutorial?
Thank you, again,
Jochen
> Dear Jochen,
>
> L2 : L doesn't copy the List,
>
> its only a new name for the same! object/list
>
> instead try copylist:
>
> DistributePlus1(L) :=
> block (
> L1 : [], L2 : [] ,
>
> for i : 1 thru length(L) do
> (L2 : copylist (L),
>
> L2[i] : L2[i]+1,
> L1 : append(L1, [L2]) ),
> L1 );
>
>
> Roland Stewen
>
>