I have a warning using the construction x -> f(x, i) where i is the parameter
of a loop. It seems that G.A.P. builds a function with two parameters x, i and
says "i undefined global variable" (it's only a warning).
---------------
A := [12, 56, 45, 2, 76, 11, 7] ;
for i in [0..2] do
   Print(" elemts = ", i, " mod 3 : ", Filtered(A, x -> RemInt(x, 3) = i), "\n") ;
od ;
-----------------------
---------------------------
gap> A := [12, 56, 45, 2, 76, 11, 7] ;
[ 12, 56, 45, 2, 76, 11, 7 ]
gap> for i in [0..2] do
>    Print(" elemts = ", i, " mod 3 : ", Filtered(A, x -> RemInt(x, 3) = i), "\n") ;
Syntax error: warning, undefined global variable
   Print(" elemts = ", i, " mod 3 : ", Filtered(A, x -> RemInt(x, 3) = i), "\n\") ;
> od ;
 elemts = 0 mod 3 : [ 12, 45 ]
 elemts = 1 mod 3 : [ 76, 7 ]
 elemts = 2 mod 3 : [ 56, 2, 11 ]
-------------------------------
Thanks.
--
Claude Quitte
Dept de Mathematiques
40 Av du recteur Pineau
E-mail Internet : quitte@knuth.univ-poitiers.fr