

ArrayCreateFromList(list):=
[
  Local(result,i);
  result:=ArrayCreate(Length(list),0);
  i:=1;
  While (list != {})
  [
    result[i]:=Head(list);
    i++;
    list:=Tail(list);
  ];
  result;
];

ListFromArray(array):= (array[1 .. ArraySize(array) ]);

