Hello,
PARI/GP well supports assignments like
[a,b] = [1,2];
However, this does not work in loops like
? foreach(factor(100)~, [p,k], print([p,k]) )
*** variable name expected: foreach(factor(100)~,[p,k],print([p,k]))
*** ^-------------------
Currently we can only get vectors as whole, but not unpack them:
? foreach(Vec(factor(100)~), pk, print(pk) )
[2, 2]~
[5, 2]~
PS. This particular example would allow us to easily parse primes and their powers from the factorization.
Regards,
Max