Question: Too many levels of recursions

I tried the following (simplified) for loop

q[1,0]:=x->x^2;
for i from 1 to 2 do
q[1,i]:= 2* diff(q[1,i-1](x),x);
od;

something seems to be wrong when trying to assing the new functions:

q[1,1](x);

just gives "Error, (in q[1, 2]) too many levels of recursion"

What am i doing wrong here?

Please Wait...