CopyListEntries can create lists when the last element is unbound #4927
Closed
Description
opened on Jul 6, 2022
In GAP, lists should always have a bound last element, but CopyListEntries
can be used to create a completely unbound list, for example:
gap> l := [1,2,3,4,5,6];
[ 1, 2, 3, 4, 5, 6 ]
gap> CopyListEntries([], 1, 1, l, 1, 1, 6);
gap> l;
[ ,,,,, ]
This list is very "fragile", for example:
gap> IsBound(l[6]);
false
gap> l;
[ ,,,,, ]
gap> Length(l);
6
gap> Unbind(l[6]);
gap> l;
[ ]
Activity