Bill Allombert on Sat, 14 Feb 2026 16:30:49 +0100


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

Re: Problem with recursive function return value


On Sat, Feb 14, 2026 at 03:54:14PM +0100, hermann@stamm-wilbrandt.de wrote:
> ? A=[1,2;2,3;2,11;3,31];
> ? mo(v)=Mod(v[1],v[2]);
> ? ch(M)=print(M);if(#M==1,mo(A[,1]),chinese(mo(A[,1]),ch(M[,2..#M])));

Did you mix A and M ? 
A is constant so mo(A[,1]) is constant so all you are computing is
chinese(mo(A[,1]),mo(A[,1])) which is mo(A[,1]).

Cheers,
Bill.