Bill Allombert on Tue, 12 Mar 2024 23:56:52 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Avoid using "listput()" if possible?


On Tue, Mar 12, 2024 at 09:06:22AM +0100, hermann@stamm-wilbrandt.de wrote:
> Yesterday I was happy to have working "SquaresRepresentations(n,k)" using
> "for(...foreach(...listput(..)))".
> 
> ...
> for(b=a,m,foreach(SquaresRepresentations(n-b^2,k-1,b),s,listput(R,concat([b],s))));
>   Vec(R);
> }

If you use listput, please write listput(~R,...)

Cheers,
Bill.