Bruce Colletti wrote:
If X is a list with holes, how do I find the positions of the holes?

Thankx.

Bruce


The following does it:

gap> list := [,,4];
[ ,, 4 ]
gap> holes := Filtered([1..Length(list)], y -> not IsBound(list[y]));
[ 1, 2 ]

Cheers,
Sven.

_______________________________________________
Forum mailing list
[email protected]
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to