22gap> START_TEST(" xfuncs.tst" );
33gap> testXfuncs := function (list, args... )
44> local set, sum, prod;
5- > list := CallFuncList(ListX, args);
65> set := Set(list);
76> if IsEmpty(list) then
87> sum := fail ; prod := fail ;
@@ -20,11 +19,16 @@ gap> testXfuncs([2], [2], x -> x);
2019true
2120gap> testXfuncs([ 2 ,3 ] , [ 2 ,3 ] , x -> x);
2221true
22+ gap> testXfuncs([ 2 ,3 ] , [ 2 ,,3 ] , x -> x); # holes are supported
23+ true
2324gap> testXfuncs([ 2 ,3 ,2 ] , [ 2 ,3 ,2 ] , x -> x);
2425true
2526gap> testXfuncs([ [ 1 ,1 ] , [ 1 ,2 ] , [ 1 ,3 ] , [ 2 ,1 ] , [ 2 ,2 ] , [ 2 ,3 ] ] ,
2627> [ 1 ,2 ] , [ 1 ,2 ,3 ] , function (x,y ) return [ x,y] ; end );
2728true
29+ gap> testXfuncs([ [ 1 ,1 ] , [ 1 ,2 ] , [ 1 ,3 ] , [ 2 ,1 ] , [ 2 ,2 ] , [ 2 ,3 ] ] ,
30+ > [ 1 ,,2 ] , [ 1 ,,2 ,,3 ] , function (x,y ) return [ x,y] ; end ); # holes really are supported
31+ true
2832gap> testXfuncs([ [ 1 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] , [ 2 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ] , [ 1 .. 2 ] ,[ 1 ] ,[ 2 ] ,[ 3 ] ,[ 4 ] ,[ 5 ] ,[ 6 ] ,[ 7 ] ,[ 8 ] ,[ 9 ] ,[ 10 ] , function (x... ) return x; end );
2933true
3034gap> sumlim := function (x... ) return Sum(x) < 5 ; end ;;
0 commit comments