Question: Procedure with n nested loops

How can I write a general procedure which will take an integer n and create n nested loops:

add(...(add(f(x_1,...,x_n),i_1=0..k_1),...),i_n=0..k_n);

Thank you in advance.

Please Wait...