[GAP Forum] something strange...

Lisette Brillemans lisette.brillemans at mensa.nl
Wed Nov 16 00:47:47 GMT 2011


Hello

I defined a function 'pair' as:  

pair:=function(x,y) return[x,y]; end;  

Also I defined 

a:=[1,2,3,4];

And discovered something strange: 


Although the output of

ListX(Combinations(a,2),Combinations(a,2),\<,pair);

is

> [ [ [ 1, 2 ], [ 1, 3 ] ], [ [ 1, 2 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 2, 3 ] ], [ [ 1, 2 ], [ 2, 4 ] ], 
>   [ [ 1, 2 ], [ 3, 4 ] ], [ [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 3 ], [ 2, 3 ] ], [ [ 1, 3 ], [ 2, 4 ] ], 
>   [ [ 1, 3 ], [ 3, 4 ] ], [ [ 1, 4 ], [ 2, 3 ] ], [ [ 1, 4 ], [ 2, 4 ] ], [ [ 1, 4 ], [ 3, 4 ] ], 
>   [ [ 2, 3 ], [ 2, 4 ] ], [ [ 2, 3 ], [ 3, 4 ] ], [ [ 2, 4 ], [ 3, 4 ] ] ]
> 
(as it should be)

the output of 

ListX(Combinations(a,2),Combinations(a,2),\>,pair);  
> 
is:
> 
Variable: '>' must have a value

> 
Why is that?
> 
> Lisette
> 
> 




More information about the Forum mailing list