I have a question regarding holes in the lists. Assume that I have the following code:
gap> l:=[2,3,,5];
[ 2, 3,, 5 ]
gap> for i in [1..Size(l)] do
> Print(l[i],"\n");
> od;
2
3
Error, List Element: <list>[3] must have an assigned value in
Print( l[i], "\n" ); at *stdin*:13 called from
<function "unknown">( <arguments> )
called from read-eval loop at *stdin*:14
you can 'return;' after assigning a value
Is there some function to find if the i-th element of a list is hole or not before trying to access it? I am looking for something like this:
gap> for i in [1..Size(l)] do
> if IS_HOLE(l[i])=true then Print("Hole \n); else Print(l[i],"\n"); fi;
> od;
I've read the manual, but still have no clue how to deal with this. Can anybody suggest some solution to this problem, please?