problem with lists



Dear Jochen,

L2 : L   doesn't copy the List,

its only a new name for the same! object/list

may be, 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